diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-31 12:24:00 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-31 12:24:00 -0500 |
commit | 30716e07ef511ec7525c07eb1e8060ba8943c2a2 (patch) | |
tree | eb6a47cae63d3587fa773cc5a16781eaa2c7810b /drivers/scsi | |
parent | 03c79cc56e4497cbd09d74a73c1bd0d1d9a8a16c (diff) | |
parent | f56df2f4db6e4af87fb8e941cff69f4501a111df (diff) |
Merge branch 'linus'
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/3w-xxxx.c | 60 | ||||
-rw-r--r-- | drivers/scsi/3w-xxxx.h | 2 | ||||
-rw-r--r-- | drivers/scsi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 20 | ||||
-rw-r--r-- | drivers/scsi/advansys.c | 3 | ||||
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 12 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mem.c | 6 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 6 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla1280.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gs.c | 24 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 76 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 15 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 59 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 33 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/seagate.c | 5 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 2 |
24 files changed, 201 insertions, 159 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 99a259c5a0c0..e1b44d6c0c32 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -6,7 +6,7 @@ | |||
6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
7 | Brad Strand <linux@3ware.com> | 7 | Brad Strand <linux@3ware.com> |
8 | 8 | ||
9 | Copyright (C) 1999-2005 3ware Inc. | 9 | Copyright (C) 1999-2007 3ware Inc. |
10 | 10 | ||
11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> | 11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> |
12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> | 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> |
@@ -191,6 +191,9 @@ | |||
191 | before shutting down card. | 191 | before shutting down card. |
192 | Change to new 'change_queue_depth' api. | 192 | Change to new 'change_queue_depth' api. |
193 | Fix 'handled=1' ISR usage, remove bogus IRQ check. | 193 | Fix 'handled=1' ISR usage, remove bogus IRQ check. |
194 | 1.26.02.002 - Free irq handler in __tw_shutdown(). | ||
195 | Turn on RCD bit for caching mode page. | ||
196 | Serialize reset code. | ||
194 | */ | 197 | */ |
195 | 198 | ||
196 | #include <linux/module.h> | 199 | #include <linux/module.h> |
@@ -214,7 +217,7 @@ | |||
214 | #include "3w-xxxx.h" | 217 | #include "3w-xxxx.h" |
215 | 218 | ||
216 | /* Globals */ | 219 | /* Globals */ |
217 | #define TW_DRIVER_VERSION "1.26.02.001" | 220 | #define TW_DRIVER_VERSION "1.26.02.002" |
218 | static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; | 221 | static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; |
219 | static int tw_device_extension_count = 0; | 222 | static int tw_device_extension_count = 0; |
220 | static int twe_major = -1; | 223 | static int twe_major = -1; |
@@ -226,7 +229,7 @@ MODULE_LICENSE("GPL"); | |||
226 | MODULE_VERSION(TW_DRIVER_VERSION); | 229 | MODULE_VERSION(TW_DRIVER_VERSION); |
227 | 230 | ||
228 | /* Function prototypes */ | 231 | /* Function prototypes */ |
229 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset); | 232 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev); |
230 | 233 | ||
231 | /* Functions */ | 234 | /* Functions */ |
232 | 235 | ||
@@ -984,24 +987,12 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int | |||
984 | /* Now wait for the command to complete */ | 987 | /* Now wait for the command to complete */ |
985 | timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); | 988 | timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); |
986 | 989 | ||
987 | /* See if we reset while waiting for the ioctl to complete */ | ||
988 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) { | ||
989 | clear_bit(TW_IN_RESET, &tw_dev->flags); | ||
990 | retval = -ERESTARTSYS; | ||
991 | goto out2; | ||
992 | } | ||
993 | |||
994 | /* We timed out, and didn't get an interrupt */ | 990 | /* We timed out, and didn't get an interrupt */ |
995 | if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { | 991 | if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { |
996 | /* Now we need to reset the board */ | 992 | /* Now we need to reset the board */ |
997 | printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); | 993 | printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); |
998 | retval = -EIO; | 994 | retval = -EIO; |
999 | spin_lock_irqsave(tw_dev->host->host_lock, flags); | 995 | if (tw_reset_device_extension(tw_dev)) { |
1000 | tw_dev->state[request_id] = TW_S_COMPLETED; | ||
1001 | tw_state_request_finish(tw_dev, request_id); | ||
1002 | tw_dev->posted_request_count--; | ||
1003 | spin_unlock_irqrestore(tw_dev->host->host_lock, flags); | ||
1004 | if (tw_reset_device_extension(tw_dev, 1)) { | ||
1005 | printk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): Reset failed for card %d.\n", tw_dev->host->host_no); | 996 | printk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): Reset failed for card %d.\n", tw_dev->host->host_no); |
1006 | } | 997 | } |
1007 | goto out2; | 998 | goto out2; |
@@ -1336,7 +1327,7 @@ static void tw_unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd) | |||
1336 | } /* End tw_unmap_scsi_data() */ | 1327 | } /* End tw_unmap_scsi_data() */ |
1337 | 1328 | ||
1338 | /* This function will reset a device extension */ | 1329 | /* This function will reset a device extension */ |
1339 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset) | 1330 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev) |
1340 | { | 1331 | { |
1341 | int i = 0; | 1332 | int i = 0; |
1342 | struct scsi_cmnd *srb; | 1333 | struct scsi_cmnd *srb; |
@@ -1382,15 +1373,10 @@ static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_rese | |||
1382 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no); | 1373 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no); |
1383 | return 1; | 1374 | return 1; |
1384 | } | 1375 | } |
1385 | TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); | ||
1386 | 1376 | ||
1387 | /* Wake up any ioctl that was pending before the reset */ | 1377 | TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); |
1388 | if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) { | 1378 | clear_bit(TW_IN_RESET, &tw_dev->flags); |
1389 | clear_bit(TW_IN_RESET, &tw_dev->flags); | 1379 | tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; |
1390 | } else { | ||
1391 | tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; | ||
1392 | wake_up(&tw_dev->ioctl_wqueue); | ||
1393 | } | ||
1394 | 1380 | ||
1395 | return 0; | 1381 | return 0; |
1396 | } /* End tw_reset_device_extension() */ | 1382 | } /* End tw_reset_device_extension() */ |
@@ -1437,14 +1423,18 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt) | |||
1437 | "WARNING: Command (0x%x) timed out, resetting card.\n", | 1423 | "WARNING: Command (0x%x) timed out, resetting card.\n", |
1438 | SCpnt->cmnd[0]); | 1424 | SCpnt->cmnd[0]); |
1439 | 1425 | ||
1426 | /* Make sure we are not issuing an ioctl or resetting from ioctl */ | ||
1427 | mutex_lock(&tw_dev->ioctl_lock); | ||
1428 | |||
1440 | /* Now reset the card and some of the device extension data */ | 1429 | /* Now reset the card and some of the device extension data */ |
1441 | if (tw_reset_device_extension(tw_dev, 0)) { | 1430 | if (tw_reset_device_extension(tw_dev)) { |
1442 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no); | 1431 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no); |
1443 | goto out; | 1432 | goto out; |
1444 | } | 1433 | } |
1445 | 1434 | ||
1446 | retval = SUCCESS; | 1435 | retval = SUCCESS; |
1447 | out: | 1436 | out: |
1437 | mutex_unlock(&tw_dev->ioctl_lock); | ||
1448 | return retval; | 1438 | return retval; |
1449 | } /* End tw_scsi_eh_reset() */ | 1439 | } /* End tw_scsi_eh_reset() */ |
1450 | 1440 | ||
@@ -1660,9 +1650,9 @@ static int tw_scsiop_mode_sense_complete(TW_Device_Extension *tw_dev, int reques | |||
1660 | request_buffer[4] = 0x8; /* caching page */ | 1650 | request_buffer[4] = 0x8; /* caching page */ |
1661 | request_buffer[5] = 0xa; /* page length */ | 1651 | request_buffer[5] = 0xa; /* page length */ |
1662 | if (*flags & 0x1) | 1652 | if (*flags & 0x1) |
1663 | request_buffer[6] = 0x4; /* WCE on */ | 1653 | request_buffer[6] = 0x5; /* WCE on, RCD on */ |
1664 | else | 1654 | else |
1665 | request_buffer[6] = 0x0; /* WCE off */ | 1655 | request_buffer[6] = 0x1; /* WCE off, RCD on */ |
1666 | tw_transfer_internal(tw_dev, request_id, request_buffer, | 1656 | tw_transfer_internal(tw_dev, request_id, request_buffer, |
1667 | sizeof(request_buffer)); | 1657 | sizeof(request_buffer)); |
1668 | 1658 | ||
@@ -2012,6 +2002,10 @@ static int tw_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd | |||
2012 | int retval = 1; | 2002 | int retval = 1; |
2013 | TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; | 2003 | TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; |
2014 | 2004 | ||
2005 | /* If we are resetting due to timed out ioctl, report as busy */ | ||
2006 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) | ||
2007 | return SCSI_MLQUEUE_HOST_BUSY; | ||
2008 | |||
2015 | /* Save done function into Scsi_Cmnd struct */ | 2009 | /* Save done function into Scsi_Cmnd struct */ |
2016 | SCpnt->scsi_done = done; | 2010 | SCpnt->scsi_done = done; |
2017 | 2011 | ||
@@ -2100,6 +2094,10 @@ static irqreturn_t tw_interrupt(int irq, void *dev_instance) | |||
2100 | 2094 | ||
2101 | handled = 1; | 2095 | handled = 1; |
2102 | 2096 | ||
2097 | /* If we are resetting, bail */ | ||
2098 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) | ||
2099 | goto tw_interrupt_bail; | ||
2100 | |||
2103 | /* Check controller for errors */ | 2101 | /* Check controller for errors */ |
2104 | if (tw_check_bits(status_reg_value)) { | 2102 | if (tw_check_bits(status_reg_value)) { |
2105 | dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); | 2103 | dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); |
@@ -2276,6 +2274,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev) | |||
2276 | /* Disable interrupts */ | 2274 | /* Disable interrupts */ |
2277 | TW_DISABLE_INTERRUPTS(tw_dev); | 2275 | TW_DISABLE_INTERRUPTS(tw_dev); |
2278 | 2276 | ||
2277 | /* Free up the IRQ */ | ||
2278 | free_irq(tw_dev->tw_pci_dev->irq, tw_dev); | ||
2279 | |||
2279 | printk(KERN_WARNING "3w-xxxx: Shutting down host %d.\n", tw_dev->host->host_no); | 2280 | printk(KERN_WARNING "3w-xxxx: Shutting down host %d.\n", tw_dev->host->host_no); |
2280 | 2281 | ||
2281 | /* Tell the card we are shutting down */ | 2282 | /* Tell the card we are shutting down */ |
@@ -2444,9 +2445,6 @@ static void tw_remove(struct pci_dev *pdev) | |||
2444 | twe_major = -1; | 2445 | twe_major = -1; |
2445 | } | 2446 | } |
2446 | 2447 | ||
2447 | /* Free up the IRQ */ | ||
2448 | free_irq(tw_dev->tw_pci_dev->irq, tw_dev); | ||
2449 | |||
2450 | /* Shutdown the card */ | 2448 | /* Shutdown the card */ |
2451 | __tw_shutdown(tw_dev); | 2449 | __tw_shutdown(tw_dev); |
2452 | 2450 | ||
diff --git a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h index bbd654a2b9b1..0742e6846656 100644 --- a/drivers/scsi/3w-xxxx.h +++ b/drivers/scsi/3w-xxxx.h | |||
@@ -6,7 +6,7 @@ | |||
6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
7 | Brad Strand <linux@3ware.com> | 7 | Brad Strand <linux@3ware.com> |
8 | 8 | ||
9 | Copyright (C) 1999-2005 3ware Inc. | 9 | Copyright (C) 1999-2007 3ware Inc. |
10 | 10 | ||
11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> | 11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> |
12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> | 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> |
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 0133f3a6977d..5bf3f07870ba 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -1312,7 +1312,7 @@ config SCSI_LPFC | |||
1312 | 1312 | ||
1313 | config SCSI_SEAGATE | 1313 | config SCSI_SEAGATE |
1314 | tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" | 1314 | tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" |
1315 | depends on X86 && ISA && SCSI && BROKEN | 1315 | depends on X86 && ISA && SCSI |
1316 | ---help--- | 1316 | ---help--- |
1317 | These are 8-bit SCSI controllers; the ST-01 is also supported by | 1317 | These are 8-bit SCSI controllers; the ST-01 is also supported by |
1318 | this driver. It is explained in section 3.9 of the SCSI-HOWTO, | 1318 | this driver. It is explained in section 3.9 of the SCSI-HOWTO, |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 1feda449aedc..a9734e08fe28 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -117,8 +117,8 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
117 | { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */ | 117 | { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */ |
118 | { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */ | 118 | { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */ |
119 | { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */ | 119 | { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */ |
120 | { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024R0 (Lancer) */ | 120 | { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024RO (Lancer) */ |
121 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */ | 121 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014RO (Lancer) */ |
122 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ | 122 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ |
123 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ | 123 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ |
124 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ | 124 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ |
@@ -137,15 +137,15 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
137 | { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 41 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ | 137 | { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 41 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ |
138 | { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 42 }, /* AAR-2610SA PCI SATA 6ch */ | 138 | { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 42 }, /* AAR-2610SA PCI SATA 6ch */ |
139 | { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 43 }, /* ASR-2240S (SabreExpress) */ | 139 | { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 43 }, /* ASR-2240S (SabreExpress) */ |
140 | { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005SAS */ | 140 | { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005 */ |
141 | { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 45 }, /* IBM 8i (AvonPark) */ | 141 | { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 45 }, /* IBM 8i (AvonPark) */ |
142 | { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 45 }, /* IBM 8i (AvonPark Lite) */ | 142 | { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 45 }, /* IBM 8i (AvonPark Lite) */ |
143 | { 0x9005, 0x0286, 0x1014, 0x9580, 0, 0, 46 }, /* IBM 8k/8k-l8 (Aurora) */ | 143 | { 0x9005, 0x0286, 0x1014, 0x9580, 0, 0, 46 }, /* IBM 8k/8k-l8 (Aurora) */ |
144 | { 0x9005, 0x0286, 0x1014, 0x9540, 0, 0, 47 }, /* IBM 8k/8k-l4 (Aurora Lite) */ | 144 | { 0x9005, 0x0286, 0x1014, 0x9540, 0, 0, 47 }, /* IBM 8k/8k-l4 (Aurora Lite) */ |
145 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */ | 145 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000 (BlackBird) */ |
146 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ | 146 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ |
147 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ | 147 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ |
148 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800SAS (Hurricane44) */ | 148 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800 (Hurricane44) */ |
149 | 149 | ||
150 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ | 150 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ |
151 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ | 151 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ |
@@ -194,8 +194,8 @@ static struct aac_driver_ident aac_drivers[] = { | |||
194 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */ | 194 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */ |
195 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */ | 195 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */ |
196 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */ | 196 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */ |
197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9024R0 ", 2 }, /* ICP9024R0 (Lancer) */ | 197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9024RO ", 2 }, /* ICP9024RO (Lancer) */ |
198 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */ | 198 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014RO ", 1 }, /* ICP9014RO (Lancer) */ |
199 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ | 199 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ |
200 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ | 200 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ |
201 | { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ | 201 | { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ |
@@ -213,14 +213,14 @@ static struct aac_driver_ident aac_drivers[] = { | |||
213 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2026ZCR ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ | 213 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2026ZCR ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ |
214 | { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ | 214 | { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ |
215 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */ | 215 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */ |
216 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005SAS ", 1 }, /* ASR-4005SAS */ | 216 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005 ", 1 }, /* ASR-4005 */ |
217 | { aac_rx_init, "ServeRAID","IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */ | 217 | { aac_rx_init, "ServeRAID","IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */ |
218 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l8 ", 1 }, /* IBM 8k/8k-l8 (Aurora) */ | 218 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l8 ", 1 }, /* IBM 8k/8k-l8 (Aurora) */ |
219 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l4 ", 1 }, /* IBM 8k/8k-l4 (Aurora Lite) */ | 219 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l4 ", 1 }, /* IBM 8k/8k-l4 (Aurora Lite) */ |
220 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ | 220 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000 ", 1 }, /* ASR-4000 (BlackBird & AvonPark) */ |
221 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ | 221 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ |
222 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ | 222 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ |
223 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800SAS ", 1 }, /* ASR-3800SAS (Hurricane44) */ | 223 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800 ", 1 }, /* ASR-3800 (Hurricane44) */ |
224 | 224 | ||
225 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ | 225 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ |
226 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ | 226 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 2b344356a29e..306bec355e45 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -18215,6 +18215,7 @@ AdvInquiryHandling( | |||
18215 | } | 18215 | } |
18216 | MODULE_LICENSE("Dual BSD/GPL"); | 18216 | MODULE_LICENSE("Dual BSD/GPL"); |
18217 | 18217 | ||
18218 | #ifdef CONFIG_PCI | ||
18218 | /* PCI Devices supported by this driver */ | 18219 | /* PCI Devices supported by this driver */ |
18219 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | 18220 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { |
18220 | { PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, | 18221 | { PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, |
@@ -18232,4 +18233,4 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | |||
18232 | { } | 18233 | { } |
18233 | }; | 18234 | }; |
18234 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); | 18235 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); |
18235 | 18236 | #endif /* CONFIG_PCI */ | |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index d0b139cccbbc..437684084377 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) | |||
749 | if (!offset) | 749 | if (!offset) |
750 | crypto_hash_update( | 750 | crypto_hash_update( |
751 | &tcp_conn->rx_hash, | 751 | &tcp_conn->rx_hash, |
752 | &sg[i], 1); | 752 | &sg[i], sg[i].length); |
753 | else | 753 | else |
754 | partial_sg_digest_update( | 754 | partial_sg_digest_update( |
755 | &tcp_conn->rx_hash, | 755 | &tcp_conn->rx_hash, |
@@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1778 | CRYPTO_ALG_ASYNC); | 1778 | CRYPTO_ALG_ASYNC); |
1779 | tcp_conn->tx_hash.flags = 0; | 1779 | tcp_conn->tx_hash.flags = 0; |
1780 | if (!tcp_conn->tx_hash.tfm) | 1780 | if (IS_ERR(tcp_conn->tx_hash.tfm)) |
1781 | goto free_tcp_conn; | 1781 | goto free_tcp_conn; |
1782 | 1782 | ||
1783 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1783 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1784 | CRYPTO_ALG_ASYNC); | 1784 | CRYPTO_ALG_ASYNC); |
1785 | tcp_conn->rx_hash.flags = 0; | 1785 | tcp_conn->rx_hash.flags = 0; |
1786 | if (!tcp_conn->rx_hash.tfm) | 1786 | if (IS_ERR(tcp_conn->rx_hash.tfm)) |
1787 | goto free_tx_tfm; | 1787 | goto free_tx_tfm; |
1788 | 1788 | ||
1789 | return cls_conn; | 1789 | return cls_conn; |
@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
2044 | sk = tcp_conn->sock->sk; | 2044 | sk = tcp_conn->sock->sk; |
2045 | if (sk->sk_family == PF_INET) { | 2045 | if (sk->sk_family == PF_INET) { |
2046 | inet = inet_sk(sk); | 2046 | inet = inet_sk(sk); |
2047 | len = sprintf(buf, "%u.%u.%u.%u\n", | 2047 | len = sprintf(buf, NIPQUAD_FMT "\n", |
2048 | NIPQUAD(inet->daddr)); | 2048 | NIPQUAD(inet->daddr)); |
2049 | } else { | 2049 | } else { |
2050 | np = inet6_sk(sk); | 2050 | np = inet6_sk(sk); |
2051 | len = sprintf(buf, | 2051 | len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr)); |
2052 | "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", | ||
2053 | NIP6(np->daddr)); | ||
2054 | } | 2052 | } |
2055 | mutex_unlock(&conn->xmitmutex); | 2053 | mutex_unlock(&conn->xmitmutex); |
2056 | break; | 2054 | break; |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index e11b23c641e2..d37048c96eab 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -260,7 +260,7 @@ static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr, | |||
260 | } | 260 | } |
261 | 261 | ||
262 | if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) { | 262 | if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) { |
263 | int senselen; | 263 | uint16_t senselen; |
264 | 264 | ||
265 | if (datalen < 2) { | 265 | if (datalen < 2) { |
266 | invalid_datalen: | 266 | invalid_datalen: |
@@ -270,12 +270,12 @@ invalid_datalen: | |||
270 | goto out; | 270 | goto out; |
271 | } | 271 | } |
272 | 272 | ||
273 | senselen = (data[0] << 8) | data[1]; | 273 | senselen = be16_to_cpu(*(uint16_t *)data); |
274 | if (datalen < senselen) | 274 | if (datalen < senselen) |
275 | goto invalid_datalen; | 275 | goto invalid_datalen; |
276 | 276 | ||
277 | memcpy(sc->sense_buffer, data + 2, | 277 | memcpy(sc->sense_buffer, data + 2, |
278 | min(senselen, SCSI_SENSE_BUFFERSIZE)); | 278 | min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); |
279 | debug_scsi("copied %d bytes of sense\n", | 279 | debug_scsi("copied %d bytes of sense\n", |
280 | min(senselen, SCSI_SENSE_BUFFERSIZE)); | 280 | min(senselen, SCSI_SENSE_BUFFERSIZE)); |
281 | } | 281 | } |
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 066292d3995a..ec3bbbde6f7a 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c | |||
@@ -56,6 +56,9 @@ lpfc_mem_alloc(struct lpfc_hba * phba) | |||
56 | 56 | ||
57 | pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * | 57 | pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * |
58 | LPFC_MBUF_POOL_SIZE, GFP_KERNEL); | 58 | LPFC_MBUF_POOL_SIZE, GFP_KERNEL); |
59 | if (!pool->elements) | ||
60 | goto fail_free_lpfc_mbuf_pool; | ||
61 | |||
59 | pool->max_count = 0; | 62 | pool->max_count = 0; |
60 | pool->current_count = 0; | 63 | pool->current_count = 0; |
61 | for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) { | 64 | for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) { |
@@ -82,10 +85,11 @@ lpfc_mem_alloc(struct lpfc_hba * phba) | |||
82 | fail_free_mbox_pool: | 85 | fail_free_mbox_pool: |
83 | mempool_destroy(phba->mbox_mem_pool); | 86 | mempool_destroy(phba->mbox_mem_pool); |
84 | fail_free_mbuf_pool: | 87 | fail_free_mbuf_pool: |
85 | while (--i) | 88 | while (i--) |
86 | pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, | 89 | pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, |
87 | pool->elements[i].phys); | 90 | pool->elements[i].phys); |
88 | kfree(pool->elements); | 91 | kfree(pool->elements); |
92 | fail_free_lpfc_mbuf_pool: | ||
89 | pci_pool_destroy(phba->lpfc_mbuf_pool); | 93 | pci_pool_destroy(phba->lpfc_mbuf_pool); |
90 | fail_free_dma_buf_pool: | 94 | fail_free_dma_buf_pool: |
91 | pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool); | 95 | pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool); |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 046223b4ae57..b5bdd0d7a8bf 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -13,8 +13,8 @@ | |||
13 | * Version : v00.00.03.05 | 13 | * Version : v00.00.03.05 |
14 | * | 14 | * |
15 | * Authors: | 15 | * Authors: |
16 | * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com> | 16 | * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsi.com> |
17 | * Sumant Patro <Sumant.Patro@lsil.com> | 17 | * Sumant Patro <Sumant.Patro@lsi.com> |
18 | * | 18 | * |
19 | * List of supported controllers | 19 | * List of supported controllers |
20 | * | 20 | * |
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | MODULE_LICENSE("GPL"); | 46 | MODULE_LICENSE("GPL"); |
47 | MODULE_VERSION(MEGASAS_VERSION); | 47 | MODULE_VERSION(MEGASAS_VERSION); |
48 | MODULE_AUTHOR("sreenivas.bagalkote@lsil.com"); | 48 | MODULE_AUTHOR("megaraidlinux@lsi.com"); |
49 | MODULE_DESCRIPTION("LSI Logic MegaRAID SAS Driver"); | 49 | MODULE_DESCRIPTION("LSI Logic MegaRAID SAS Driver"); |
50 | 50 | ||
51 | /* | 51 | /* |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 9fb0ea5c1fb9..5b458d2478f7 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -545,8 +545,6 @@ SYM53C500_release(struct pcmcia_device *link) | |||
545 | */ | 545 | */ |
546 | if (shost->irq) | 546 | if (shost->irq) |
547 | free_irq(shost->irq, shost); | 547 | free_irq(shost->irq, shost); |
548 | if (shost->dma_channel != 0xff) | ||
549 | free_dma(shost->dma_channel); | ||
550 | if (shost->io_port && shost->n_io_port) | 548 | if (shost->io_port && shost->n_io_port) |
551 | release_region(shost->io_port, shost->n_io_port); | 549 | release_region(shost->io_port, shost->n_io_port); |
552 | 550 | ||
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 16af5b79e587..1548d42a3b43 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1341 | int host_status = DID_ERROR; | 1341 | int host_status = DID_ERROR; |
1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); | 1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); |
1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); | 1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); |
1344 | uint16_t residual_length = le32_to_cpu(sts->residual_length); | 1344 | uint32_t residual_length = le32_to_cpu(sts->residual_length); |
1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); | 1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); |
1346 | #if DEBUG_QLA1280_INTR | 1346 | #if DEBUG_QLA1280_INTR |
1347 | static char *reason[] = { | 1347 | static char *reason[] = { |
@@ -1413,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1413 | "scsi: Underflow detected - retrying " | 1413 | "scsi: Underflow detected - retrying " |
1414 | "command.\n"); | 1414 | "command.\n"); |
1415 | host_status = DID_ERROR; | 1415 | host_status = DID_ERROR; |
1416 | } else | 1416 | } else { |
1417 | cp->resid = residual_length; | ||
1417 | host_status = DID_OK; | 1418 | host_status = DID_OK; |
1419 | } | ||
1418 | break; | 1420 | break; |
1419 | 1421 | ||
1420 | default: | 1422 | default: |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index e83e4a34725a..05f4f2a378eb 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1602,6 +1602,7 @@ typedef struct fc_port { | |||
1602 | 1602 | ||
1603 | #define CT_REJECT_RESPONSE 0x8001 | 1603 | #define CT_REJECT_RESPONSE 0x8001 |
1604 | #define CT_ACCEPT_RESPONSE 0x8002 | 1604 | #define CT_ACCEPT_RESPONSE 0x8002 |
1605 | #define CT_REASON_INVALID_COMMAND_CODE 0x01 | ||
1605 | #define CT_REASON_CANNOT_PERFORM 0x09 | 1606 | #define CT_REASON_CANNOT_PERFORM 0x09 |
1606 | #define CT_EXPL_ALREADY_REGISTERED 0x10 | 1607 | #define CT_EXPL_ALREADY_REGISTERED 0x10 |
1607 | 1608 | ||
@@ -2103,6 +2104,7 @@ typedef struct scsi_qla_host { | |||
2103 | uint32_t msi_enabled :1; | 2104 | uint32_t msi_enabled :1; |
2104 | uint32_t msix_enabled :1; | 2105 | uint32_t msix_enabled :1; |
2105 | uint32_t disable_serdes :1; | 2106 | uint32_t disable_serdes :1; |
2107 | uint32_t gpsc_supported :1; | ||
2106 | } flags; | 2108 | } flags; |
2107 | 2109 | ||
2108 | atomic_t loop_state; | 2110 | atomic_t loop_state; |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f8bddec4fe85..74544ae4b0e2 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -45,7 +45,6 @@ extern void qla2x00_update_fcports(scsi_qla_host_t *); | |||
45 | extern int qla2x00_abort_isp(scsi_qla_host_t *); | 45 | extern int qla2x00_abort_isp(scsi_qla_host_t *); |
46 | 46 | ||
47 | extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); | 47 | extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); |
48 | extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); | ||
49 | 48 | ||
50 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); | 49 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); |
51 | extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); | 50 | extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); |
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 97fbc62ec669..ec5b2dd90d6a 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c | |||
@@ -127,8 +127,8 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, | |||
127 | ha->host_no, routine, ms_pkt->entry_status)); | 127 | ha->host_no, routine, ms_pkt->entry_status)); |
128 | } else { | 128 | } else { |
129 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 129 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
130 | comp_status = | 130 | comp_status = le16_to_cpu( |
131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status; | 131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status); |
132 | else | 132 | else |
133 | comp_status = le16_to_cpu(ms_pkt->status); | 133 | comp_status = le16_to_cpu(ms_pkt->status); |
134 | switch (comp_status) { | 134 | switch (comp_status) { |
@@ -143,6 +143,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, | |||
143 | DEBUG2_3(qla2x00_dump_buffer( | 143 | DEBUG2_3(qla2x00_dump_buffer( |
144 | (uint8_t *)&ct_rsp->header, | 144 | (uint8_t *)&ct_rsp->header, |
145 | sizeof(struct ct_rsp_hdr))); | 145 | sizeof(struct ct_rsp_hdr))); |
146 | rval = QLA_INVALID_COMMAND; | ||
146 | } else | 147 | } else |
147 | rval = QLA_SUCCESS; | 148 | rval = QLA_SUCCESS; |
148 | break; | 149 | break; |
@@ -1683,7 +1684,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list) | |||
1683 | memset(list[i].fabric_port_name, 0, WWN_SIZE); | 1684 | memset(list[i].fabric_port_name, 0, WWN_SIZE); |
1684 | 1685 | ||
1685 | /* Prepare common MS IOCB */ | 1686 | /* Prepare common MS IOCB */ |
1686 | ms_pkt = qla2x00_prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, | 1687 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, |
1687 | GFPN_ID_RSP_SIZE); | 1688 | GFPN_ID_RSP_SIZE); |
1688 | 1689 | ||
1689 | /* Prepare CT request */ | 1690 | /* Prepare CT request */ |
@@ -1784,6 +1785,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) | |||
1784 | 1785 | ||
1785 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) | 1786 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
1786 | return QLA_FUNCTION_FAILED; | 1787 | return QLA_FUNCTION_FAILED; |
1788 | if (!ha->flags.gpsc_supported) | ||
1789 | return QLA_FUNCTION_FAILED; | ||
1787 | 1790 | ||
1788 | rval = qla2x00_mgmt_svr_login(ha); | 1791 | rval = qla2x00_mgmt_svr_login(ha); |
1789 | if (rval) | 1792 | if (rval) |
@@ -1813,8 +1816,19 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) | |||
1813 | /*EMPTY*/ | 1816 | /*EMPTY*/ |
1814 | DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB " | 1817 | DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB " |
1815 | "failed (%d).\n", ha->host_no, rval)); | 1818 | "failed (%d).\n", ha->host_no, rval)); |
1816 | } else if (qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp, | 1819 | } else if ((rval = qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp, |
1817 | "GPSC") != QLA_SUCCESS) { | 1820 | "GPSC")) != QLA_SUCCESS) { |
1821 | /* FM command unsupported? */ | ||
1822 | if (rval == QLA_INVALID_COMMAND && | ||
1823 | ct_rsp->header.reason_code == | ||
1824 | CT_REASON_INVALID_COMMAND_CODE) { | ||
1825 | DEBUG2(printk("scsi(%ld): GPSC command " | ||
1826 | "unsupported, disabling query...\n", | ||
1827 | ha->host_no)); | ||
1828 | ha->flags.gpsc_supported = 0; | ||
1829 | rval = QLA_FUNCTION_FAILED; | ||
1830 | break; | ||
1831 | } | ||
1818 | rval = QLA_FUNCTION_FAILED; | 1832 | rval = QLA_FUNCTION_FAILED; |
1819 | } else { | 1833 | } else { |
1820 | /* Save portname */ | 1834 | /* Save portname */ |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index ef87d81935d2..98c01cd5e1a8 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2065,40 +2065,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
2065 | } | 2065 | } |
2066 | } | 2066 | } |
2067 | 2067 | ||
2068 | /* | 2068 | static void |
2069 | * qla2x00_update_fcport | ||
2070 | * Updates device on list. | ||
2071 | * | ||
2072 | * Input: | ||
2073 | * ha = adapter block pointer. | ||
2074 | * fcport = port structure pointer. | ||
2075 | * | ||
2076 | * Return: | ||
2077 | * 0 - Success | ||
2078 | * BIT_0 - error | ||
2079 | * | ||
2080 | * Context: | ||
2081 | * Kernel context. | ||
2082 | */ | ||
2083 | void | ||
2084 | qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | ||
2085 | { | ||
2086 | fcport->ha = ha; | ||
2087 | fcport->login_retry = 0; | ||
2088 | fcport->port_login_retry_count = ha->port_down_retry_count * | ||
2089 | PORT_RETRY_TIME; | ||
2090 | atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * | ||
2091 | PORT_RETRY_TIME); | ||
2092 | fcport->flags &= ~FCF_LOGIN_NEEDED; | ||
2093 | |||
2094 | qla2x00_iidma_fcport(ha, fcport); | ||
2095 | |||
2096 | atomic_set(&fcport->state, FCS_ONLINE); | ||
2097 | |||
2098 | qla2x00_reg_remote_port(ha, fcport); | ||
2099 | } | ||
2100 | |||
2101 | void | ||
2102 | qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) | 2069 | qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) |
2103 | { | 2070 | { |
2104 | struct fc_rport_identifiers rport_ids; | 2071 | struct fc_rport_identifiers rport_ids; |
@@ -2141,6 +2108,39 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
2141 | } | 2108 | } |
2142 | 2109 | ||
2143 | /* | 2110 | /* |
2111 | * qla2x00_update_fcport | ||
2112 | * Updates device on list. | ||
2113 | * | ||
2114 | * Input: | ||
2115 | * ha = adapter block pointer. | ||
2116 | * fcport = port structure pointer. | ||
2117 | * | ||
2118 | * Return: | ||
2119 | * 0 - Success | ||
2120 | * BIT_0 - error | ||
2121 | * | ||
2122 | * Context: | ||
2123 | * Kernel context. | ||
2124 | */ | ||
2125 | void | ||
2126 | qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | ||
2127 | { | ||
2128 | fcport->ha = ha; | ||
2129 | fcport->login_retry = 0; | ||
2130 | fcport->port_login_retry_count = ha->port_down_retry_count * | ||
2131 | PORT_RETRY_TIME; | ||
2132 | atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * | ||
2133 | PORT_RETRY_TIME); | ||
2134 | fcport->flags &= ~FCF_LOGIN_NEEDED; | ||
2135 | |||
2136 | qla2x00_iidma_fcport(ha, fcport); | ||
2137 | |||
2138 | atomic_set(&fcport->state, FCS_ONLINE); | ||
2139 | |||
2140 | qla2x00_reg_remote_port(ha, fcport); | ||
2141 | } | ||
2142 | |||
2143 | /* | ||
2144 | * qla2x00_configure_fabric | 2144 | * qla2x00_configure_fabric |
2145 | * Setup SNS devices with loop ID's. | 2145 | * Setup SNS devices with loop ID's. |
2146 | * | 2146 | * |
@@ -3380,9 +3380,11 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3380 | 3380 | ||
3381 | /* Set host adapter parameters. */ | 3381 | /* Set host adapter parameters. */ |
3382 | ha->flags.disable_risc_code_load = 0; | 3382 | ha->flags.disable_risc_code_load = 0; |
3383 | ha->flags.enable_lip_reset = 1; | 3383 | ha->flags.enable_lip_reset = 0; |
3384 | ha->flags.enable_lip_full_login = 1; | 3384 | ha->flags.enable_lip_full_login = |
3385 | ha->flags.enable_target_reset = 1; | 3385 | le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0; |
3386 | ha->flags.enable_target_reset = | ||
3387 | le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0; | ||
3386 | ha->flags.enable_led_scheme = 0; | 3388 | ha->flags.enable_led_scheme = 0; |
3387 | ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; | 3389 | ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; |
3388 | 3390 | ||
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index c948a8ce7232..d4885616cd39 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -130,11 +130,11 @@ qla2300_intr_handler(int irq, void *dev_id) | |||
130 | if (stat & HSR_RISC_PAUSED) { | 130 | if (stat & HSR_RISC_PAUSED) { |
131 | hccr = RD_REG_WORD(®->hccr); | 131 | hccr = RD_REG_WORD(®->hccr); |
132 | if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8)) | 132 | if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8)) |
133 | qla_printk(KERN_INFO, ha, | 133 | qla_printk(KERN_INFO, ha, "Parity error -- " |
134 | "Parity error -- HCCR=%x.\n", hccr); | 134 | "HCCR=%x, Dumping firmware!\n", hccr); |
135 | else | 135 | else |
136 | qla_printk(KERN_INFO, ha, | 136 | qla_printk(KERN_INFO, ha, "RISC paused -- " |
137 | "RISC paused -- HCCR=%x.\n", hccr); | 137 | "HCCR=%x, Dumping firmware!\n", hccr); |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * Issue a "HARD" reset in order for the RISC | 140 | * Issue a "HARD" reset in order for the RISC |
@@ -143,6 +143,8 @@ qla2300_intr_handler(int irq, void *dev_id) | |||
143 | */ | 143 | */ |
144 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); | 144 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); |
145 | RD_REG_WORD(®->hccr); | 145 | RD_REG_WORD(®->hccr); |
146 | |||
147 | ha->isp_ops.fw_dump(ha, 1); | ||
146 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 148 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
147 | break; | 149 | break; |
148 | } else if ((stat & HSR_RISC_INT) == 0) | 150 | } else if ((stat & HSR_RISC_INT) == 0) |
@@ -467,6 +469,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
467 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); | 469 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); |
468 | } | 470 | } |
469 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); | 471 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); |
472 | |||
473 | ha->flags.gpsc_supported = 1; | ||
470 | break; | 474 | break; |
471 | 475 | ||
472 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ | 476 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ |
@@ -1444,8 +1448,7 @@ qla24xx_intr_handler(int irq, void *dev_id) | |||
1444 | 1448 | ||
1445 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1449 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
1446 | "Dumping firmware!\n", hccr); | 1450 | "Dumping firmware!\n", hccr); |
1447 | qla24xx_fw_dump(ha, 1); | 1451 | ha->isp_ops.fw_dump(ha, 1); |
1448 | |||
1449 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 1452 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
1450 | break; | 1453 | break; |
1451 | } else if ((stat & HSRX_RISC_INT) == 0) | 1454 | } else if ((stat & HSRX_RISC_INT) == 0) |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index c6f0cdf4cdc4..83376f6ac3db 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1323,9 +1323,9 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) | |||
1323 | 1323 | ||
1324 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 1324 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1325 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1325 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
1326 | mcp->mb[1] = BIT_0; | 1326 | mcp->mb[1] = BIT_6; |
1327 | mcp->mb[2] = 0xff; | 1327 | mcp->mb[2] = 0; |
1328 | mcp->mb[3] = 0; | 1328 | mcp->mb[3] = ha->loop_reset_delay; |
1329 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 1329 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
1330 | } else { | 1330 | } else { |
1331 | mcp->mb[0] = MBC_LIP_RESET; | 1331 | mcp->mb[0] = MBC_LIP_RESET; |
@@ -1807,8 +1807,8 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha) | |||
1807 | ha->host_no)); | 1807 | ha->host_no)); |
1808 | 1808 | ||
1809 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1809 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
1810 | mcp->mb[1] = 0; | 1810 | mcp->mb[1] = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? BIT_3: 0; |
1811 | mcp->mb[2] = 0xff; | 1811 | mcp->mb[2] = 0; |
1812 | mcp->mb[3] = 0; | 1812 | mcp->mb[3] = 0; |
1813 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 1813 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
1814 | mcp->in_mb = MBX_0; | 1814 | mcp->in_mb = MBX_0; |
@@ -2470,7 +2470,7 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, | |||
2470 | mcp->mb[4] = LSW(MSD(eft_dma)); | 2470 | mcp->mb[4] = LSW(MSD(eft_dma)); |
2471 | mcp->mb[5] = MSW(MSD(eft_dma)); | 2471 | mcp->mb[5] = MSW(MSD(eft_dma)); |
2472 | mcp->mb[6] = buffers; | 2472 | mcp->mb[6] = buffers; |
2473 | mcp->mb[7] = buffers; | 2473 | mcp->mb[7] = 0; |
2474 | mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2; | 2474 | mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2; |
2475 | } | 2475 | } |
2476 | mcp->tov = 30; | 2476 | mcp->tov = 30; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 6f161d3f661b..68f5d24b938b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1037,48 +1037,49 @@ eh_host_reset_lock: | |||
1037 | static int | 1037 | static int |
1038 | qla2x00_loop_reset(scsi_qla_host_t *ha) | 1038 | qla2x00_loop_reset(scsi_qla_host_t *ha) |
1039 | { | 1039 | { |
1040 | int status = QLA_SUCCESS; | 1040 | int ret; |
1041 | struct fc_port *fcport; | 1041 | struct fc_port *fcport; |
1042 | 1042 | ||
1043 | if (ha->flags.enable_lip_full_login) { | ||
1044 | ret = qla2x00_full_login_lip(ha); | ||
1045 | if (ret != QLA_SUCCESS) { | ||
1046 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | ||
1047 | "full_login_lip=%d.\n", __func__, ha->host_no, | ||
1048 | ret)); | ||
1049 | } | ||
1050 | atomic_set(&ha->loop_state, LOOP_DOWN); | ||
1051 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); | ||
1052 | qla2x00_mark_all_devices_lost(ha, 0); | ||
1053 | qla2x00_wait_for_loop_ready(ha); | ||
1054 | } | ||
1055 | |||
1043 | if (ha->flags.enable_lip_reset) { | 1056 | if (ha->flags.enable_lip_reset) { |
1044 | status = qla2x00_lip_reset(ha); | 1057 | ret = qla2x00_lip_reset(ha); |
1058 | if (ret != QLA_SUCCESS) { | ||
1059 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | ||
1060 | "lip_reset=%d.\n", __func__, ha->host_no, ret)); | ||
1061 | } | ||
1062 | qla2x00_wait_for_loop_ready(ha); | ||
1045 | } | 1063 | } |
1046 | 1064 | ||
1047 | if (status == QLA_SUCCESS && ha->flags.enable_target_reset) { | 1065 | if (ha->flags.enable_target_reset) { |
1048 | list_for_each_entry(fcport, &ha->fcports, list) { | 1066 | list_for_each_entry(fcport, &ha->fcports, list) { |
1049 | if (fcport->port_type != FCT_TARGET) | 1067 | if (fcport->port_type != FCT_TARGET) |
1050 | continue; | 1068 | continue; |
1051 | 1069 | ||
1052 | status = qla2x00_device_reset(ha, fcport); | 1070 | ret = qla2x00_device_reset(ha, fcport); |
1053 | if (status != QLA_SUCCESS) | 1071 | if (ret != QLA_SUCCESS) { |
1054 | break; | 1072 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " |
1073 | "target_reset=%d d_id=%x.\n", __func__, | ||
1074 | ha->host_no, ret, fcport->d_id.b24)); | ||
1075 | } | ||
1055 | } | 1076 | } |
1056 | } | 1077 | } |
1057 | 1078 | ||
1058 | if (status == QLA_SUCCESS && | ||
1059 | ((!ha->flags.enable_target_reset && | ||
1060 | !ha->flags.enable_lip_reset) || | ||
1061 | ha->flags.enable_lip_full_login)) { | ||
1062 | |||
1063 | status = qla2x00_full_login_lip(ha); | ||
1064 | } | ||
1065 | |||
1066 | /* Issue marker command only when we are going to start the I/O */ | 1079 | /* Issue marker command only when we are going to start the I/O */ |
1067 | ha->marker_needed = 1; | 1080 | ha->marker_needed = 1; |
1068 | 1081 | ||
1069 | if (status) { | 1082 | return QLA_SUCCESS; |
1070 | /* Empty */ | ||
1071 | DEBUG2_3(printk("%s(%ld): **** FAILED ****\n", | ||
1072 | __func__, | ||
1073 | ha->host_no)); | ||
1074 | } else { | ||
1075 | /* Empty */ | ||
1076 | DEBUG3(printk("%s(%ld): exiting normally.\n", | ||
1077 | __func__, | ||
1078 | ha->host_no)); | ||
1079 | } | ||
1080 | |||
1081 | return(status); | ||
1082 | } | 1083 | } |
1083 | 1084 | ||
1084 | /* | 1085 | /* |
@@ -1413,7 +1414,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1413 | 1414 | ||
1414 | sht = &qla2x00_driver_template; | 1415 | sht = &qla2x00_driver_template; |
1415 | if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || | 1416 | if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || |
1416 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432) | 1417 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432 || |
1418 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5422 || | ||
1419 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5432) | ||
1417 | sht = &qla24xx_driver_template; | 1420 | sht = &qla24xx_driver_template; |
1418 | host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t)); | 1421 | host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t)); |
1419 | if (host == NULL) { | 1422 | if (host == NULL) { |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 1fa0bce6b24e..459e0d6bd2b4 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.01.07-k3" | 10 | #define QLA2XXX_VERSION "8.01.07-k4" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 1 | 13 | #define QLA_DRIVER_MINOR_VER 1 |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index b8f0cab57813..8160c00d1092 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -133,12 +133,10 @@ struct async_scan_data { | |||
133 | /** | 133 | /** |
134 | * scsi_complete_async_scans - Wait for asynchronous scans to complete | 134 | * scsi_complete_async_scans - Wait for asynchronous scans to complete |
135 | * | 135 | * |
136 | * Asynchronous scans add themselves to the scanning_hosts list. Once | 136 | * When this function returns, any host which started scanning before |
137 | * that list is empty, we know that the scans are complete. Rather than | 137 | * this function was called will have finished its scan. Hosts which |
138 | * waking up periodically to check the state of the list, we pretend to be | 138 | * started scanning after this function was called may or may not have |
139 | * a scanning task by adding ourselves at the end of the list and going to | 139 | * finished. |
140 | * sleep. When the task before us wakes us up, we take ourselves off the | ||
141 | * list and return. | ||
142 | */ | 140 | */ |
143 | int scsi_complete_async_scans(void) | 141 | int scsi_complete_async_scans(void) |
144 | { | 142 | { |
@@ -171,6 +169,11 @@ int scsi_complete_async_scans(void) | |||
171 | 169 | ||
172 | spin_lock(&async_scan_lock); | 170 | spin_lock(&async_scan_lock); |
173 | list_del(&data->list); | 171 | list_del(&data->list); |
172 | if (!list_empty(&scanning_hosts)) { | ||
173 | struct async_scan_data *next = list_entry(scanning_hosts.next, | ||
174 | struct async_scan_data, list); | ||
175 | complete(&next->prev_finished); | ||
176 | } | ||
174 | done: | 177 | done: |
175 | spin_unlock(&async_scan_lock); | 178 | spin_unlock(&async_scan_lock); |
176 | 179 | ||
@@ -739,6 +742,14 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
739 | sdev->no_uld_attach = 1; | 742 | sdev->no_uld_attach = 1; |
740 | 743 | ||
741 | switch (sdev->type = (inq_result[0] & 0x1f)) { | 744 | switch (sdev->type = (inq_result[0] & 0x1f)) { |
745 | case TYPE_RBC: | ||
746 | /* RBC devices can return SCSI-3 compliance and yet | ||
747 | * still not support REPORT LUNS, so make them act as | ||
748 | * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is | ||
749 | * specifically set */ | ||
750 | if ((*bflags & BLIST_REPORTLUN2) == 0) | ||
751 | *bflags |= BLIST_NOREPORTLUN; | ||
752 | /* fall through */ | ||
742 | case TYPE_TAPE: | 753 | case TYPE_TAPE: |
743 | case TYPE_DISK: | 754 | case TYPE_DISK: |
744 | case TYPE_PRINTER: | 755 | case TYPE_PRINTER: |
@@ -749,11 +760,17 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
749 | case TYPE_ENCLOSURE: | 760 | case TYPE_ENCLOSURE: |
750 | case TYPE_COMM: | 761 | case TYPE_COMM: |
751 | case TYPE_RAID: | 762 | case TYPE_RAID: |
752 | case TYPE_RBC: | ||
753 | sdev->writeable = 1; | 763 | sdev->writeable = 1; |
754 | break; | 764 | break; |
755 | case TYPE_WORM: | ||
756 | case TYPE_ROM: | 765 | case TYPE_ROM: |
766 | /* MMC devices can return SCSI-3 compliance and yet | ||
767 | * still not support REPORT LUNS, so make them act as | ||
768 | * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is | ||
769 | * specifically set */ | ||
770 | if ((*bflags & BLIST_REPORTLUN2) == 0) | ||
771 | *bflags |= BLIST_NOREPORTLUN; | ||
772 | /* fall through */ | ||
773 | case TYPE_WORM: | ||
757 | sdev->writeable = 0; | 774 | sdev->writeable = 0; |
758 | break; | 775 | break; |
759 | default: | 776 | default: |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 9c22f1342715..ce0d14af33c8 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1416,7 +1416,7 @@ static __init int iscsi_transport_init(void) | |||
1416 | { | 1416 | { |
1417 | int err; | 1417 | int err; |
1418 | 1418 | ||
1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.", | 1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.\n", |
1420 | ISCSI_TRANSPORT_VERSION); | 1420 | ISCSI_TRANSPORT_VERSION); |
1421 | 1421 | ||
1422 | err = class_register(&iscsi_transport_class); | 1422 | err = class_register(&iscsi_transport_class); |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 3fded4831460..014d7fea1ff3 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -122,7 +122,7 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, | |||
122 | if (!sshdr) | 122 | if (!sshdr) |
123 | sshdr = &sshdr_tmp; | 123 | sshdr = &sshdr_tmp; |
124 | 124 | ||
125 | if (scsi_normalize_sense(sense, sizeof(*sense), | 125 | if (scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, |
126 | sshdr) | 126 | sshdr) |
127 | && sshdr->sense_key == UNIT_ATTENTION) | 127 | && sshdr->sense_key == UNIT_ATTENTION) |
128 | continue; | 128 | continue; |
diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index 5ffec2721b28..ff62e9708e1c 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c | |||
@@ -114,6 +114,7 @@ | |||
114 | #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0) | 114 | #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0) |
115 | #else | 115 | #else |
116 | #define DPRINTK( when, msg... ) do { } while (0) | 116 | #define DPRINTK( when, msg... ) do { } while (0) |
117 | #define DEBUG 0 | ||
117 | #endif | 118 | #endif |
118 | #define DANY( msg... ) DPRINTK( 0xffff, msg ); | 119 | #define DANY( msg... ) DPRINTK( 0xffff, msg ); |
119 | 120 | ||
@@ -523,7 +524,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) | |||
523 | #ifdef ARBITRATE | 524 | #ifdef ARBITRATE |
524 | " ARBITRATE" | 525 | " ARBITRATE" |
525 | #endif | 526 | #endif |
526 | #ifdef DEBUG | 527 | #if DEBUG |
527 | " DEBUG" | 528 | " DEBUG" |
528 | #endif | 529 | #endif |
529 | #ifdef FAST | 530 | #ifdef FAST |
@@ -733,7 +734,7 @@ static int internal_command (unsigned char target, unsigned char lun, | |||
733 | unsigned char *data = NULL; | 734 | unsigned char *data = NULL; |
734 | struct scatterlist *buffer = NULL; | 735 | struct scatterlist *buffer = NULL; |
735 | int clock, temp, nobuffs = 0, done = 0, len = 0; | 736 | int clock, temp, nobuffs = 0, done = 0, len = 0; |
736 | #ifdef DEBUG | 737 | #if DEBUG |
737 | int transfered = 0, phase = 0, newphase; | 738 | int transfered = 0, phase = 0, newphase; |
738 | #endif | 739 | #endif |
739 | register unsigned char status_read; | 740 | register unsigned char status_read; |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index fae6e95a6298..89e9b36b1788 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -468,7 +468,7 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, | |||
468 | } | 468 | } |
469 | 469 | ||
470 | ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg); | 470 | ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg); |
471 | if (ret != ENOSYS) | 471 | if (ret != -ENOSYS) |
472 | return ret; | 472 | return ret; |
473 | 473 | ||
474 | /* | 474 | /* |