From e55a3e8aed99626dd9a9a6732fc0eb5b75ef29bd Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:49 -0700 Subject: kconfig: remove leading whitespace in menu prompts This removes all the leading whitespace kconfig now warns about. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- drivers/scsi/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index a480a3742d4..3e254560df4 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1159,7 +1159,7 @@ config SCSI_NCR_Q720 you do not have this SCSI card, so say N. config SCSI_NCR53C8XX_DEFAULT_TAGS - int " default tagged command queue depth" + int "default tagged command queue depth" depends on SCSI_ZALON || SCSI_NCR_Q720 default "8" ---help--- @@ -1185,7 +1185,7 @@ config SCSI_NCR53C8XX_DEFAULT_TAGS There is no safe option other than using good SCSI devices. config SCSI_NCR53C8XX_MAX_TAGS - int " maximum number of queued commands" + int "maximum number of queued commands" depends on SCSI_ZALON || SCSI_NCR_Q720 default "32" ---help--- @@ -1202,7 +1202,7 @@ config SCSI_NCR53C8XX_MAX_TAGS There is no safe option and the default answer is recommended. config SCSI_NCR53C8XX_SYNC - int " synchronous transfers frequency in MHz" + int "synchronous transfers frequency in MHz" depends on SCSI_ZALON || SCSI_NCR_Q720 default "20" ---help--- @@ -1236,7 +1236,7 @@ config SCSI_NCR53C8XX_SYNC terminations and SCSI conformant devices. config SCSI_NCR53C8XX_PROFILE - bool " enable profiling" + bool "enable profiling" depends on SCSI_ZALON || SCSI_NCR_Q720 help This option allows you to enable profiling information gathering. @@ -1247,7 +1247,7 @@ config SCSI_NCR53C8XX_PROFILE The normal answer therefore is N. config SCSI_NCR53C8XX_NO_DISCONNECT - bool " not allow targets to disconnect" + bool "not allow targets to disconnect" depends on (SCSI_ZALON || SCSI_NCR_Q720) && SCSI_NCR53C8XX_DEFAULT_TAGS=0 help This option is only provided for safety if you suspect some SCSI -- cgit From bdca3f202dbeaca2fcc4fb47219476286c999b0d Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 26 Jun 2006 18:19:23 +0200 Subject: remove the bouncing email address of David Campbell This patch removes a bouncing email address from the kernel sources. Signed-off-by: Adrian Bunk --- drivers/scsi/imm.c | 3 --- drivers/scsi/imm.h | 2 +- drivers/scsi/ppa.c | 2 -- drivers/scsi/ppa.h | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index cd2dffdab77..681bd18493f 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -3,9 +3,6 @@ * * (The IMM is the embedded controller in the ZIP Plus drive.) * - * Current Maintainer: David Campbell (Perth, Western Australia) - * campbell@torque.net - * * My unoffical company acronym list is 21 pages long: * FLA: Four letter acronym with built in facility for * future expansion to five letters. diff --git a/drivers/scsi/imm.h b/drivers/scsi/imm.h index dc3aebf0e36..ece936ac29c 100644 --- a/drivers/scsi/imm.h +++ b/drivers/scsi/imm.h @@ -2,7 +2,7 @@ /* Driver for the Iomega MatchMaker parallel port SCSI HBA embedded in * the Iomega ZIP Plus drive * - * (c) 1998 David Campbell campbell@torque.net + * (c) 1998 David Campbell * * Please note that I live in Perth, Western Australia. GMT+0800 */ diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index 108910f512e..d58ac5ad509 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c @@ -6,8 +6,6 @@ * (c) 1995,1996 Grant R. Guenther, grant@torque.net, * under the terms of the GNU General Public License. * - * Current Maintainer: David Campbell (Perth, Western Australia, GMT+0800) - * campbell@torque.net */ #include diff --git a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h index f6e1a1574bb..7511df3588e 100644 --- a/drivers/scsi/ppa.h +++ b/drivers/scsi/ppa.h @@ -2,7 +2,7 @@ * the Iomega ZIP drive * * (c) 1996 Grant R. Guenther grant@torque.net - * David Campbell campbell@torque.net + * David Campbell * * All comments to David. */ -- cgit From d6e05edc59ecd79e8badf440c0d295a979bdfa3e Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Mon, 26 Jun 2006 18:35:02 +0200 Subject: spelling fixes acquired (aquired) contiguous (contigious) successful (succesful, succesfull) surprise (suprise) whether (weather) some other misspellings Signed-off-by: Andreas Mohr Signed-off-by: Adrian Bunk --- drivers/scsi/NCR5380.c | 2 +- drivers/scsi/advansys.c | 2 +- drivers/scsi/dc395x.c | 2 +- drivers/scsi/ibmmca.c | 8 ++++---- drivers/scsi/ips.c | 4 ++-- drivers/scsi/st.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index fa57e0b4a5f..75f2f7ae2a8 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -500,7 +500,7 @@ static void NCR5380_print_phase(struct Scsi_Host *instance) /* * Function : int should_disconnect (unsigned char cmd) * - * Purpose : decide weather a command would normally disconnect or + * Purpose : decide whether a command would normally disconnect or * not, since if it won't disconnect we should go to sleep. * * Input : cmd - opcode of SCSI command diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 5ee47555a8a..dd9fb3d9100 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -12374,7 +12374,7 @@ AscInitFromEEP(ASC_DVC_VAR *asc_dvc) ASC_PRINT1( "AscInitFromEEP: Failed to re-write EEPROM with %d errors.\n", i); } else { - ASC_PRINT("AscInitFromEEP: Succesfully re-wrote EEPROM."); + ASC_PRINT("AscInitFromEEP: Successfully re-wrote EEPROM.\n"); } } return (warn_code); diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 18324525493..58b0748045e 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -3771,7 +3771,7 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, * @target: The target for the new device. * @lun: The lun for the new device. * - * Return the new device if succesfull or NULL on failure. + * Return the new device if successful or NULL on failure. **/ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb, u8 target, u8 lun) diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 115f55471ed..497f6642b2d 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c @@ -760,7 +760,7 @@ static int device_inquiry(int host_index, int ldn) while (!got_interrupt(host_index)) barrier(); - /*if command succesful, break */ + /*if command successful, break */ if ((stat_result(host_index) == IM_SCB_CMD_COMPLETED) || (stat_result(host_index) == IM_SCB_CMD_COMPLETED_WITH_RETRIES)) return 1; } @@ -885,7 +885,7 @@ static int immediate_assign(int host_index, unsigned int pun, unsigned int lun, while (!got_interrupt(host_index)) barrier(); - /*if command succesful, break */ + /*if command successful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } @@ -921,7 +921,7 @@ static int immediate_feature(int host_index, unsigned int speed, unsigned int ti return 2; } else global_command_error_excuse = 0; - /*if command succesful, break */ + /*if command successful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } @@ -959,7 +959,7 @@ static int immediate_reset(int host_index, unsigned int ldn) /* did not work, finish */ return 1; } - /*if command succesful, break */ + /*if command successful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 5353b28b293..78f2ff736c3 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -6438,7 +6438,7 @@ ips_erase_bios(ips_ha_t * ha) /* VPP failure */ return (1); - /* check for succesful flash */ + /* check for successful flash */ if (status & 0x30) /* sequence error */ return (1); @@ -6550,7 +6550,7 @@ ips_erase_bios_memio(ips_ha_t * ha) /* VPP failure */ return (1); - /* check for succesful flash */ + /* check for successful flash */ if (status & 0x30) /* sequence error */ return (1); diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 1272dd249af..b5218fc0ac8 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -2818,7 +2818,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon (cmdstatp->sense_hdr.sense_key == NO_SENSE || cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) && undone == 0) { - ioctl_result = 0; /* EOF written succesfully at EOM */ + ioctl_result = 0; /* EOF written successfully at EOM */ if (fileno >= 0) fileno++; STps->drv_file = fileno; -- cgit From 179e09172ab663b8587ecc46bb18a56a770304a9 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 26 Jun 2006 00:24:41 -0700 Subject: [PATCH] drivers: use list_move() This patch converts the combination of list_del(A) and list_add(A, B) to list_move(A, B) under drivers/. Acked-by: Corey Minyard Cc: Ben Collins Acked-by: Roland Dreier Cc: Alasdair Kergon Cc: Gerd Knorr Cc: Paul Mackerras Cc: Frank Pavlic Acked-by: Matthew Wilcox Cc: Andrew Vasquez Cc: Mikael Starvik Cc: Greg Kroah-Hartman Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/ncr53c8xx.c | 3 +-- drivers/scsi/qla2xxx/qla_init.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 6ab035590ee..b28712df0b7 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -5118,8 +5118,7 @@ static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp) cp->host_status &= ~HS_SKIPMASK; cp->start.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, select)); - list_del(&cp->link_ccbq); - list_add_tail(&cp->link_ccbq, &lp->skip_ccbq); + list_move_tail(&cp->link_ccbq, &lp->skip_ccbq); if (cp->queued) { --lp->queuedccbs; } diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index aef093db597..3d4487eac9b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2258,8 +2258,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) } /* Remove device from the new list and add it to DB */ - list_del(&fcport->list); - list_add_tail(&fcport->list, &ha->fcports); + list_move_tail(&fcport->list, &ha->fcports); /* Login and update database */ qla2x00_fabric_dev_login(ha, fcport, &next_loopid); -- cgit From a813ce432f27c4f5011c7b5ac9d2bbbfeb41d9a7 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 26 Jun 2006 13:57:22 +0200 Subject: [PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded. - Rename the GART_IOMMU option to IOMMU to make clear it's not just for AMD - Rewrite the help text to better emphatise this fact - Make it an embedded option because too many people get it wrong. To my astonishment I discovered the aacraid driver tests this symbol directly. This looks quite broken to me - it's an internal implementation detail of the PCI DMA API. Can the maintainer please clarify what this test was intended to do? Cc: linux-scsi@vger.kernel.org Cc: alan@redhat.com Cc: markh@osdl.org Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- drivers/scsi/aacraid/comminit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 35b0a6ebd3f..7cea514e810 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -104,8 +104,11 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co * always true on real computers. It also has some slight problems * with the GART on x86-64. I've btw never tried DMA from PCI space * on this platform but don't be surprised if its problematic. + * [AK: something is very very wrong when a driver tests this symbol. + * Someone should figure out what the comment writer really meant here and fix + * the code. Or just remove that bad code. ] */ -#ifndef CONFIG_GART_IOMMU +#ifndef CONFIG_IOMMU if ((num_physpages << (PAGE_SHIFT - 12)) <= AAC_MAX_HOSTPHYSMEMPAGES) { init->HostPhysMemPages = cpu_to_le32(num_physpages << (PAGE_SHIFT-12)); -- cgit From 8676ce07d38a09e0f41497d178357a314c4620cf Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 26 Jun 2006 20:41:33 -0400 Subject: [libata] Bump versions Update major version for libata, and several drivers. Signed-off-by: Jeff Garzik --- drivers/scsi/ahci.c | 2 +- drivers/scsi/ata_piix.c | 2 +- drivers/scsi/libata.h | 2 +- drivers/scsi/sata_nv.c | 2 +- drivers/scsi/sata_sil.c | 2 +- drivers/scsi/sata_sil24.c | 2 +- drivers/scsi/sata_svw.c | 2 +- drivers/scsi/sata_uli.c | 2 +- drivers/scsi/sata_via.c | 2 +- drivers/scsi/sata_vsc.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 4bb77f62b3b..f0594677771 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -48,7 +48,7 @@ #include #define DRV_NAME "ahci" -#define DRV_VERSION "1.3" +#define DRV_VERSION "2.0" enum { diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 521b718763f..94b1261a259 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c @@ -93,7 +93,7 @@ #include #define DRV_NAME "ata_piix" -#define DRV_VERSION "1.10" +#define DRV_VERSION "2.00" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index bdd48889709..e367a3af409 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h @@ -29,7 +29,7 @@ #define __LIBATA_H__ #define DRV_NAME "libata" -#define DRV_VERSION "1.30" /* must be exactly four chars */ +#define DRV_VERSION "2.00" /* must be exactly four chars */ struct ata_scsi_args { struct ata_device *dev; diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index d18e7e0932e..5cc42c6054e 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c @@ -44,7 +44,7 @@ #include #define DRV_NAME "sata_nv" -#define DRV_VERSION "0.9" +#define DRV_VERSION "2.0" enum { NV_PORTS = 2, diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index bc9f918a7f2..662ad10de28 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -46,7 +46,7 @@ #include #define DRV_NAME "sata_sil" -#define DRV_VERSION "1.0" +#define DRV_VERSION "2.0" enum { /* diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index c8b477c6724..b5f8fa95567 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -31,7 +31,7 @@ #include #define DRV_NAME "sata_sil24" -#define DRV_VERSION "0.24" +#define DRV_VERSION "0.3" /* * Port request block (PRB) 32 bytes diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index c94b870cf37..7566c2cabaf 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c @@ -54,7 +54,7 @@ #endif /* CONFIG_PPC_OF */ #define DRV_NAME "sata_svw" -#define DRV_VERSION "1.8" +#define DRV_VERSION "2.0" enum { /* Taskfile registers offsets */ diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index f668c997e9a..64f3c1aeed2 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c @@ -37,7 +37,7 @@ #include #define DRV_NAME "sata_uli" -#define DRV_VERSION "0.6" +#define DRV_VERSION "1.0" enum { uli_5289 = 0, diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 322890b400a..67c3d299977 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c @@ -47,7 +47,7 @@ #include #define DRV_NAME "sata_via" -#define DRV_VERSION "1.2" +#define DRV_VERSION "2.0" enum board_ids_enum { vt6420, diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 6d0c4f18e65..01893a0cf1a 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c @@ -47,7 +47,7 @@ #include #define DRV_NAME "sata_vsc" -#define DRV_VERSION "1.2" +#define DRV_VERSION "2.0" enum { /* Interrupt register offsets (from chip base address) */ -- cgit From 438bc9c3dec27ab37f0ff78471d0b8b91addd2dd Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 26 Jun 2006 20:52:17 -0400 Subject: [libata] sata_vsc: partially revert a PCI ID-related commit Partially revert 74d0a988d3aa359b6b8a8536c8cb92cce02ca5d5: [PATCH] PCI: Move various PCI IDs to header file libata policy is to avoid use of named PCI device ID constants. These are often single-use constants, which have little value over direct numeric constants save for constant include/linux/pci_ids.h patching/merging headaches. Signed-off-by: Jeff Garzik --- drivers/scsi/sata_vsc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 01893a0cf1a..616fd9634b4 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c @@ -443,16 +443,12 @@ err_out: } -/* - * Intel 31244 is supposed to be identical. - * Compatibility is untested as of yet. - */ static const struct pci_device_id vsc_sata_pci_tbl[] = { - { PCI_VENDOR_ID_VITESSE, PCI_DEVICE_ID_VITESSE_VSC7174, + { PCI_VENDOR_ID_VITESSE, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, - { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GD31244, + { PCI_VENDOR_ID_INTEL, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, - { } + { } /* terminate list */ }; -- cgit From af181c2d765ec9735356bc313ab9e844ec2c7a24 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:18 +0900 Subject: [PATCH] libata: move ata_eh_clear_action() upward Move ata_eh_clear_action() upward. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-eh.c | 50 ++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 823385981a7..126be36289a 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -93,6 +93,31 @@ static int ata_ering_map(struct ata_ering *ering, return rc; } +static void ata_eh_clear_action(struct ata_device *dev, + struct ata_eh_info *ehi, unsigned int action) +{ + int i; + + if (!dev) { + ehi->action &= ~action; + for (i = 0; i < ATA_MAX_DEVICES; i++) + ehi->dev_action[i] &= ~action; + } else { + /* doesn't make sense for port-wide EH actions */ + WARN_ON(!(action & ATA_EH_PERDEV_MASK)); + + /* break ehi->action into ehi->dev_action */ + if (ehi->action & action) { + for (i = 0; i < ATA_MAX_DEVICES; i++) + ehi->dev_action[i] |= ehi->action & action; + ehi->action &= ~action; + } + + /* turn off the specified per-dev action */ + ehi->dev_action[dev->devno] &= ~action; + } +} + /** * ata_scsi_timed_out - SCSI layer time out callback * @cmd: timed out SCSI command @@ -705,31 +730,6 @@ static void ata_eh_detach_dev(struct ata_device *dev) spin_unlock_irqrestore(ap->lock, flags); } -static void ata_eh_clear_action(struct ata_device *dev, - struct ata_eh_info *ehi, unsigned int action) -{ - int i; - - if (!dev) { - ehi->action &= ~action; - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] &= ~action; - } else { - /* doesn't make sense for port-wide EH actions */ - WARN_ON(!(action & ATA_EH_PERDEV_MASK)); - - /* break ehi->action into ehi->dev_action */ - if (ehi->action & action) { - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] |= ehi->action & action; - ehi->action &= ~action; - } - - /* turn off the specified per-dev action */ - ehi->dev_action[dev->devno] &= ~action; - } -} - /** * ata_eh_about_to_do - about to perform eh_action * @ap: target ATA port -- cgit From 64f65ca6e7a5a42df22ff29dadfff389dc388f65 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:18 +0900 Subject: [PATCH] libata: implement and use ata_deh_dev_action() Implement and use ata_eh_dev_action() which returns EH action mask for a device. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-eh.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 126be36289a..c7e6298db05 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -93,6 +93,13 @@ static int ata_ering_map(struct ata_ering *ering, return rc; } +static unsigned int ata_eh_dev_action(struct ata_device *dev) +{ + struct ata_eh_context *ehc = &dev->ap->eh_context; + + return ehc->i.action | ehc->i.dev_action[dev->devno]; +} + static void ata_eh_clear_action(struct ata_device *dev, struct ata_eh_info *ehi, unsigned int action) { @@ -1592,7 +1599,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, unsigned int action; dev = &ap->device[i]; - action = ehc->i.action | ehc->i.dev_action[dev->devno]; + action = ata_eh_dev_action(dev); if (action & ATA_EH_REVALIDATE && ata_dev_enabled(dev)) { if (ata_port_offline(ap)) { -- cgit From beb07c1a56e2cff3842e22c473bd1aaaea08e532 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:19 +0900 Subject: [PATCH] libata: clear EH action on device detach Clear related EH action on device detach such that new device doesn't receive EH actions scheduled for the old one. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-eh.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index c7e6298db05..bf5a72aca8a 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -734,6 +734,10 @@ static void ata_eh_detach_dev(struct ata_device *dev) ap->flags |= ATA_FLAG_SCSI_HOTPLUG; } + /* clear per-dev EH actions */ + ata_eh_clear_action(dev, &ap->eh_info, ATA_EH_PERDEV_MASK); + ata_eh_clear_action(dev, &ap->eh_context.i, ATA_EH_PERDEV_MASK); + spin_unlock_irqrestore(ap->lock, flags); } -- cgit From e58eb583969ff662c8c337e9b3b50ab5ef37e27e Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:19 +0900 Subject: [PATCH] libata: move ata_do_simple_cmd() below ata_exec_internal() Move ata_do_simple_cmd() below ata_exec_internal() for consistency. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6c66877be2b..bbd6665eb21 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1131,6 +1131,29 @@ unsigned ata_exec_internal(struct ata_device *dev, return err_mask; } +/* + * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, + * without filling any other registers + */ +static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) +{ + struct ata_taskfile tf; + int err; + + ata_tf_init(dev, &tf); + + tf.command = cmd; + tf.flags |= ATA_TFLAG_DEVICE; + tf.protocol = ATA_PROT_NODATA; + + err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); + if (err) + ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n", + __FUNCTION__, err); + + return err; +} + /** * ata_pio_need_iordy - check if iordy needed * @adev: ATA device @@ -4946,29 +4969,6 @@ int ata_port_offline(struct ata_port *ap) return 0; } -/* - * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, - * without filling any other registers - */ -static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) -{ - struct ata_taskfile tf; - int err; - - ata_tf_init(dev, &tf); - - tf.command = cmd; - tf.flags |= ATA_TFLAG_DEVICE; - tf.protocol = ATA_PROT_NODATA; - - err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); - if (err) - ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n", - __FUNCTION__, err); - - return err; -} - static int ata_flush_cache(struct ata_device *dev) { u8 cmd; -- cgit From 977e6b9f3a9b17f1c608a9d1e5a7b5c46a5f7d4a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:19 +0900 Subject: [PATCH] libata: update ata_do_simple_cmd() * the function has always returned AC_ERR_* masks not -errno but its return type was int. Make return type unsigned int. * don't print error message automatically. it's the caller's responsibility. * add header comment Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 57 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 14 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index bbd6665eb21..4a44e759e45 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1131,14 +1131,23 @@ unsigned ata_exec_internal(struct ata_device *dev, return err_mask; } -/* - * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, - * without filling any other registers +/** + * ata_do_simple_cmd - execute simple internal command + * @dev: Device to which the command is sent + * @cmd: Opcode to execute + * + * Execute a 'simple' command, that only consists of the opcode + * 'cmd' itself, without filling any other registers + * + * LOCKING: + * Kernel thread context (may sleep). + * + * RETURNS: + * Zero on success, AC_ERR_* mask on failure */ -static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) +static unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) { struct ata_taskfile tf; - int err; ata_tf_init(dev, &tf); @@ -1146,12 +1155,7 @@ static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) tf.flags |= ATA_TFLAG_DEVICE; tf.protocol = ATA_PROT_NODATA; - err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); - if (err) - ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n", - __FUNCTION__, err); - - return err; + return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); } /** @@ -4971,6 +4975,7 @@ int ata_port_offline(struct ata_port *ap) static int ata_flush_cache(struct ata_device *dev) { + unsigned int err_mask; u8 cmd; if (!ata_try_flush_cache(dev)) @@ -4981,17 +4986,41 @@ static int ata_flush_cache(struct ata_device *dev) else cmd = ATA_CMD_FLUSH; - return ata_do_simple_cmd(dev, cmd); + err_mask = ata_do_simple_cmd(dev, cmd); + if (err_mask) { + ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n"); + return -EIO; + } + + return 0; } static int ata_standby_drive(struct ata_device *dev) { - return ata_do_simple_cmd(dev, ATA_CMD_STANDBYNOW1); + unsigned int err_mask; + + err_mask = ata_do_simple_cmd(dev, ATA_CMD_STANDBYNOW1); + if (err_mask) { + ata_dev_printk(dev, KERN_ERR, "failed to standby drive " + "(err_mask=0x%x)\n", err_mask); + return -EIO; + } + + return 0; } static int ata_start_drive(struct ata_device *dev) { - return ata_do_simple_cmd(dev, ATA_CMD_IDLEIMMEDIATE); + unsigned int err_mask; + + err_mask = ata_do_simple_cmd(dev, ATA_CMD_IDLEIMMEDIATE); + if (err_mask) { + ata_dev_printk(dev, KERN_ERR, "failed to start drive " + "(err_mask=0x%x)\n", err_mask); + return -EIO; + } + + return 0; } /** -- cgit From 77b08fb56a41e84b5e78b14f24d79879235e3337 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 24 Jun 2006 20:30:19 +0900 Subject: [PATCH] libata: make two functions global Make ata_do_simple_cmd() and ata_flush_cache() global. These will be used from libata-eh.c. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 4 ++-- drivers/scsi/libata.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 4a44e759e45..60e80e3a885 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1145,7 +1145,7 @@ unsigned ata_exec_internal(struct ata_device *dev, * RETURNS: * Zero on success, AC_ERR_* mask on failure */ -static unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) +unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) { struct ata_taskfile tf; @@ -4973,7 +4973,7 @@ int ata_port_offline(struct ata_port *ap) return 0; } -static int ata_flush_cache(struct ata_device *dev) +int ata_flush_cache(struct ata_device *dev) { unsigned int err_mask; u8 cmd; diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index e367a3af409..c325679d9b5 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h @@ -50,6 +50,7 @@ extern void ata_port_flush_task(struct ata_port *ap); extern unsigned ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf, const u8 *cdb, int dma_dir, void *buf, unsigned int buflen); +extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd); extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, int post_reset, u16 *id); extern int ata_dev_configure(struct ata_device *dev, int print_info); @@ -64,6 +65,7 @@ extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); extern void ata_dev_select(struct ata_port *ap, unsigned int device, unsigned int wait, unsigned int can_sleep); extern void swap_buf_le16(u16 *buf, unsigned int buf_words); +extern int ata_flush_cache(struct ata_device *dev); extern void ata_dev_init(struct ata_device *dev); extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg); extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); -- cgit From a8601e5f6b77aa4f223058a93bc5f77e1ee45638 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 25 Jun 2006 01:36:52 -0700 Subject: [PATCH] libata reduce timeouts From: Andrew Morton Provide a module parameter to override the default 30-second-per-device SATA probing timeout. Cc: Tejun Heo Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 60e80e3a885..10f15ab95fa 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -88,6 +88,10 @@ int libata_fua = 0; module_param_named(fua, libata_fua, int, 0444); MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)"); +static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ; +module_param(ata_probe_timeout, int, 0444); +MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)"); + MODULE_AUTHOR("Jeff Garzik"); MODULE_DESCRIPTION("Library module for ATA devices"); MODULE_LICENSE("GPL"); @@ -1059,7 +1063,7 @@ unsigned ata_exec_internal(struct ata_device *dev, spin_unlock_irqrestore(ap->lock, flags); - rc = wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL); + rc = wait_for_completion_timeout(&wait, ata_probe_timeout); ata_port_flush_task(ap); @@ -5738,6 +5742,7 @@ int ata_pci_device_resume(struct pci_dev *pdev) static int __init ata_init(void) { + ata_probe_timeout *= HZ; ata_wq = create_workqueue("ata"); if (!ata_wq) return -ENOMEM; -- cgit From 88574551b46ba69b0f145d2775006f2e7dfebc84 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sun, 25 Jun 2006 20:00:35 +0900 Subject: [PATCH] libata: cosmetic updates Cosmetic updates in libata-core.c. * trim trailing whitespaces * break lines which are over 80 column * kill unnecessary braces * make indentation consistent Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 61 ++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 10f15ab95fa..47fff7bbf34 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -781,11 +781,9 @@ void ata_std_dev_select (struct ata_port *ap, unsigned int device) void ata_dev_select(struct ata_port *ap, unsigned int device, unsigned int wait, unsigned int can_sleep) { - if (ata_msg_probe(ap)) { + if (ata_msg_probe(ap)) ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, ata%u: " - "device %u, wait %u\n", - ap->id, device, wait); - } + "device %u, wait %u\n", ap->id, device, wait); if (wait) ata_wait_idle(ap); @@ -954,7 +952,8 @@ void ata_port_flush_task(struct ata_port *ap) */ if (!cancel_delayed_work(&ap->port_task)) { if (ata_msg_ctl(ap)) - ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n", __FUNCTION__); + ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n", + __FUNCTION__); flush_workqueue(ata_wq); } @@ -1085,7 +1084,7 @@ unsigned ata_exec_internal(struct ata_device *dev, if (ata_msg_warn(ap)) ata_dev_printk(dev, KERN_WARNING, - "qc timeout (cmd 0x%x)\n", command); + "qc timeout (cmd 0x%x)\n", command); } spin_unlock_irqrestore(ap->lock, flags); @@ -1097,9 +1096,9 @@ unsigned ata_exec_internal(struct ata_device *dev, if (qc->flags & ATA_QCFLAG_FAILED && !qc->err_mask) { if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, + ata_dev_printk(dev, KERN_WARNING, "zero err_mask for failed " - "internal command, assuming AC_ERR_OTHER\n"); + "internal command, assuming AC_ERR_OTHER\n"); qc->err_mask |= AC_ERR_OTHER; } @@ -1224,8 +1223,8 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, int rc; if (ata_msg_ctl(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", - __FUNCTION__, ap->id, dev->devno); + ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", + __FUNCTION__, ap->id, dev->devno); ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ @@ -1294,9 +1293,9 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, return 0; err_out: - if (ata_msg_warn(ap)) + if (ata_msg_warn(ap)) ata_dev_printk(dev, KERN_WARNING, "failed to IDENTIFY " - "(%s, err_mask=0x%x)\n", reason, err_mask); + "(%s, err_mask=0x%x)\n", reason, err_mask); return rc; } @@ -1349,19 +1348,21 @@ int ata_dev_configure(struct ata_device *dev, int print_info) int i, rc; if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { - ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n", - __FUNCTION__, ap->id, dev->devno); + ata_dev_printk(dev, KERN_INFO, + "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n", + __FUNCTION__, ap->id, dev->devno); return 0; } if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", - __FUNCTION__, ap->id, dev->devno); + ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", + __FUNCTION__, ap->id, dev->devno); /* print device capabilities */ if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: cfg 49:%04x 82:%04x 83:%04x " - "84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n", + ata_dev_printk(dev, KERN_DEBUG, + "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " + "85:%04x 86:%04x 87:%04x 88:%04x\n", __FUNCTION__, id[49], id[82], id[83], id[84], id[85], id[86], id[87], id[88]); @@ -1433,14 +1434,16 @@ int ata_dev_configure(struct ata_device *dev, int print_info) ata_id_major_version(id), ata_mode_string(xfer_mask), (unsigned long long)dev->n_sectors, - dev->cylinders, dev->heads, dev->sectors); + dev->cylinders, dev->heads, + dev->sectors); } if (dev->id[59] & 0x100) { dev->multi_count = dev->id[59] & 0xff; if (ata_msg_info(ap)) - ata_dev_printk(dev, KERN_INFO, "ata%u: dev %u multi count %u\n", - ap->id, dev->devno, dev->multi_count); + ata_dev_printk(dev, KERN_INFO, + "ata%u: dev %u multi count %u\n", + ap->id, dev->devno, dev->multi_count); } dev->cdb_len = 16; @@ -1453,8 +1456,8 @@ int ata_dev_configure(struct ata_device *dev, int print_info) rc = atapi_cdb_len(id); if ((rc < 12) || (rc > ATAPI_CDB_LEN)) { if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, - "unsupported CDB len\n"); + ata_dev_printk(dev, KERN_WARNING, + "unsupported CDB len\n"); rc = -EINVAL; goto err_out_nosup; } @@ -1497,8 +1500,8 @@ int ata_dev_configure(struct ata_device *dev, int print_info) err_out_nosup: if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, - "%s: EXIT, err\n", __FUNCTION__); + ata_dev_printk(dev, KERN_DEBUG, + "%s: EXIT, err\n", __FUNCTION__); return rc; } @@ -3558,7 +3561,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) * Inherited from caller. */ -void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, +void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) { struct ata_port *ap = adev->ap; @@ -3604,7 +3607,7 @@ void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, * Inherited from caller. */ -void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, +void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) { struct ata_port *ap = adev->ap; @@ -3638,7 +3641,7 @@ void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, * @buflen: buffer length * @write_data: read/write * - * Transfer data from/to the device data register by PIO. Do the + * Transfer data from/to the device data register by PIO. Do the * transfer with interrupts disabled. * * LOCKING: @@ -5245,7 +5248,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, ap->msg_enable = 0x00FF; #elif defined(ATA_DEBUG) ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO | ATA_MSG_CTL | ATA_MSG_WARN | ATA_MSG_ERR; -#else +#else ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; #endif -- cgit From 201ce85946504ea0e6bd9a365de26684b437121e Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 26 Jun 2006 21:23:52 +0900 Subject: [PATCH] sata_sil: disable hotplug interrupts on two ATI IXPs Some SATA controllers embedded in ATI IXPs seem to have broken SATA_IRQ bit in their bmdma2 registers which is always stuck at 1. This makes the driver believe that there has been a hotplug event and freeze the port whenever there's an interrupt thus failing all commands. This patch disables SATA_IRQ for those controllers. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/sata_sil.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 662ad10de28..51d86d750e8 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -52,6 +52,7 @@ enum { /* * host flags */ + SIL_FLAG_NO_SATA_IRQ = (1 << 28), SIL_FLAG_RERR_ON_DMA_ACT = (1 << 29), SIL_FLAG_MOD15WRITE = (1 << 30), @@ -62,8 +63,9 @@ enum { * Controller IDs */ sil_3112 = 0, - sil_3512 = 1, - sil_3114 = 2, + sil_3112_no_sata_irq = 1, + sil_3512 = 2, + sil_3114 = 3, /* * Register offsets @@ -123,8 +125,8 @@ static const struct pci_device_id sil_pci_tbl[] = { { 0x1095, 0x3512, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3512 }, { 0x1095, 0x3114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3114 }, { 0x1002, 0x436e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, - { 0x1002, 0x4379, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, - { 0x1002, 0x437a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, + { 0x1002, 0x4379, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, + { 0x1002, 0x437a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, { } /* terminate list */ }; @@ -217,6 +219,16 @@ static const struct ata_port_info sil_port_info[] = { .udma_mask = 0x3f, /* udma0-5 */ .port_ops = &sil_ops, }, + /* sil_3112_no_sata_irq */ + { + .sht = &sil_sht, + .host_flags = SIL_DFL_HOST_FLAGS | SIL_FLAG_MOD15WRITE | + SIL_FLAG_NO_SATA_IRQ, + .pio_mask = 0x1f, /* pio0-4 */ + .mwdma_mask = 0x07, /* mwdma0-2 */ + .udma_mask = 0x3f, /* udma0-5 */ + .port_ops = &sil_ops, + }, /* sil_3512 */ { .sht = &sil_sht, @@ -437,6 +449,10 @@ static irqreturn_t sil_interrupt(int irq, void *dev_instance, if (unlikely(!ap || ap->flags & ATA_FLAG_DISABLED)) continue; + /* turn off SATA_IRQ if not supported */ + if (ap->flags & SIL_FLAG_NO_SATA_IRQ) + bmdma2 &= ~SIL_DMA_SATA_IRQ; + if (bmdma2 == 0xffffffff || !(bmdma2 & (SIL_DMA_COMPLETE | SIL_DMA_SATA_IRQ))) continue; @@ -474,8 +490,9 @@ static void sil_thaw(struct ata_port *ap) ata_chk_status(ap); ata_bmdma_irq_clear(ap); - /* turn on SATA IRQ */ - writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien); + /* turn on SATA IRQ if supported */ + if (!(ap->flags & SIL_FLAG_NO_SATA_IRQ)) + writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien); /* turn on IRQ */ tmp = readl(mmio_base + SIL_SYSCFG); -- cgit From 2154cfa6ba560401d25f6cc083fe3fb996cbb571 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 26 Jun 2006 07:51:28 -0700 Subject: [PATCH] ata_piix: add ICH6/7/8 to Kconfig Ata_piix's Kconfig entry still refers only to ICH5, while it supports ICH6 through 8. This creates confusion with people who are looking to see if their newer SATA enabled motherboards are supported. The following patch makes this clear. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index c84b02aec1f..96a81cd1761 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -501,7 +501,7 @@ config SCSI_ATA_PIIX tristate "Intel PIIX/ICH SATA support" depends on SCSI_SATA && PCI help - This option enables support for ICH5 Serial ATA. + This option enables support for ICH5/6/7/8 Serial ATA. If PATA support was enabled previously, this enables support for select Intel PIIX/ICH PATA host controllers. -- cgit From 34af946a22724c4e2b204957f2b24b22a0fb121c Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 27 Jun 2006 02:53:55 -0700 Subject: [PATCH] spin/rwlock init cleanups locking init cleanups: - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK() - convert rwlocks in a similar manner this patch was generated automatically. Motivation: - cleanliness - lockdep needs control of lock initialization, which the open-coded variants do not give - it's also useful for -rt and for lock debugging in general Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6c66877be2b..855ce9a9d94 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -5733,7 +5733,7 @@ module_init(ata_init); module_exit(ata_exit); static unsigned long ratelimit_time; -static spinlock_t ata_ratelimit_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(ata_ratelimit_lock); int ata_ratelimit(void) { -- cgit From 8f7607803717e9d045965b210cd16a25d80cd04b Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Tue, 27 Jun 2006 02:55:06 -0700 Subject: [PATCH] Remove redundant NULL checks before [kv]free - in drivers/ Remove redundant NULL chck before kfree + tiny CodingStyle cleanup for drivers/ Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/libata-scsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 93d18a74c40..2915bca691e 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -222,9 +222,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) && copy_to_user(arg + sizeof(args), argbuf, argsize)) rc = -EFAULT; error: - if (argbuf) - kfree(argbuf); - + kfree(argbuf); return rc; } -- cgit