diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/message/fusion/mptfc.c | 12 | ||||
| -rw-r--r-- | drivers/message/fusion/mptsas.c | 10 | ||||
| -rw-r--r-- | drivers/message/fusion/mptscsih.c | 8 | ||||
| -rw-r--r-- | drivers/message/fusion/mptscsih.h | 2 | ||||
| -rw-r--r-- | drivers/message/fusion/mptspi.c | 12 |
5 files changed, 18 insertions, 26 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index fd75108c355e..02a3eefd6931 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
| @@ -649,7 +649,7 @@ mptfc_slave_alloc(struct scsi_device *sdev) | |||
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | static int | 651 | static int |
| 652 | mptfc_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 652 | mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) |
| 653 | { | 653 | { |
| 654 | struct mptfc_rport_info *ri; | 654 | struct mptfc_rport_info *ri; |
| 655 | struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); | 655 | struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); |
| @@ -658,14 +658,14 @@ mptfc_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
| 658 | 658 | ||
| 659 | if (!vdevice || !vdevice->vtarget) { | 659 | if (!vdevice || !vdevice->vtarget) { |
| 660 | SCpnt->result = DID_NO_CONNECT << 16; | 660 | SCpnt->result = DID_NO_CONNECT << 16; |
| 661 | done(SCpnt); | 661 | SCpnt->scsi_done(SCpnt); |
| 662 | return 0; | 662 | return 0; |
| 663 | } | 663 | } |
| 664 | 664 | ||
| 665 | err = fc_remote_port_chkready(rport); | 665 | err = fc_remote_port_chkready(rport); |
| 666 | if (unlikely(err)) { | 666 | if (unlikely(err)) { |
| 667 | SCpnt->result = err; | 667 | SCpnt->result = err; |
| 668 | done(SCpnt); | 668 | SCpnt->scsi_done(SCpnt); |
| 669 | return 0; | 669 | return 0; |
| 670 | } | 670 | } |
| 671 | 671 | ||
| @@ -673,15 +673,13 @@ mptfc_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
| 673 | ri = *((struct mptfc_rport_info **)rport->dd_data); | 673 | ri = *((struct mptfc_rport_info **)rport->dd_data); |
| 674 | if (unlikely(!ri)) { | 674 | if (unlikely(!ri)) { |
| 675 | SCpnt->result = DID_IMM_RETRY << 16; | 675 | SCpnt->result = DID_IMM_RETRY << 16; |
| 676 | done(SCpnt); | 676 | SCpnt->scsi_done(SCpnt); |
| 677 | return 0; | 677 | return 0; |
| 678 | } | 678 | } |
| 679 | 679 | ||
| 680 | return mptscsih_qcmd(SCpnt,done); | 680 | return mptscsih_qcmd(SCpnt); |
| 681 | } | 681 | } |
| 682 | 682 | ||
| 683 | static DEF_SCSI_QCMD(mptfc_qcmd) | ||
| 684 | |||
| 685 | /* | 683 | /* |
| 686 | * mptfc_display_port_link_speed - displaying link speed | 684 | * mptfc_display_port_link_speed - displaying link speed |
| 687 | * @ioc: Pointer to MPT_ADAPTER structure | 685 | * @ioc: Pointer to MPT_ADAPTER structure |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 00d339c361fc..711fcb5cec87 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
| @@ -1896,7 +1896,7 @@ mptsas_slave_alloc(struct scsi_device *sdev) | |||
| 1896 | } | 1896 | } |
| 1897 | 1897 | ||
| 1898 | static int | 1898 | static int |
| 1899 | mptsas_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 1899 | mptsas_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) |
| 1900 | { | 1900 | { |
| 1901 | MPT_SCSI_HOST *hd; | 1901 | MPT_SCSI_HOST *hd; |
| 1902 | MPT_ADAPTER *ioc; | 1902 | MPT_ADAPTER *ioc; |
| @@ -1904,11 +1904,11 @@ mptsas_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
| 1904 | 1904 | ||
| 1905 | if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) { | 1905 | if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) { |
| 1906 | SCpnt->result = DID_NO_CONNECT << 16; | 1906 | SCpnt->result = DID_NO_CONNECT << 16; |
| 1907 | done(SCpnt); | 1907 | SCpnt->scsi_done(SCpnt); |
| 1908 | return 0; | 1908 | return 0; |
| 1909 | } | 1909 | } |
| 1910 | 1910 | ||
| 1911 | hd = shost_priv(SCpnt->device->host); | 1911 | hd = shost_priv(shost); |
| 1912 | ioc = hd->ioc; | 1912 | ioc = hd->ioc; |
| 1913 | 1913 | ||
| 1914 | if (ioc->sas_discovery_quiesce_io) | 1914 | if (ioc->sas_discovery_quiesce_io) |
| @@ -1917,11 +1917,9 @@ mptsas_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
| 1917 | if (ioc->debug_level & MPT_DEBUG_SCSI) | 1917 | if (ioc->debug_level & MPT_DEBUG_SCSI) |
| 1918 | scsi_print_command(SCpnt); | 1918 | scsi_print_command(SCpnt); |
| 1919 | 1919 | ||
| 1920 | return mptscsih_qcmd(SCpnt,done); | 1920 | return mptscsih_qcmd(SCpnt); |
| 1921 | } | 1921 | } |
| 1922 | 1922 | ||
| 1923 | static DEF_SCSI_QCMD(mptsas_qcmd) | ||
| 1924 | |||
| 1925 | /** | 1923 | /** |
| 1926 | * mptsas_mptsas_eh_timed_out - resets the scsi_cmnd timeout | 1924 | * mptsas_mptsas_eh_timed_out - resets the scsi_cmnd timeout |
| 1927 | * if the device under question is currently in the | 1925 | * if the device under question is currently in the |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 727819cc7034..2a1c6f21af27 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
| @@ -1304,7 +1304,6 @@ int mptscsih_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
| 1304 | /** | 1304 | /** |
| 1305 | * mptscsih_qcmd - Primary Fusion MPT SCSI initiator IO start routine. | 1305 | * mptscsih_qcmd - Primary Fusion MPT SCSI initiator IO start routine. |
| 1306 | * @SCpnt: Pointer to scsi_cmnd structure | 1306 | * @SCpnt: Pointer to scsi_cmnd structure |
| 1307 | * @done: Pointer SCSI mid-layer IO completion function | ||
| 1308 | * | 1307 | * |
| 1309 | * (linux scsi_host_template.queuecommand routine) | 1308 | * (linux scsi_host_template.queuecommand routine) |
| 1310 | * This is the primary SCSI IO start routine. Create a MPI SCSIIORequest | 1309 | * This is the primary SCSI IO start routine. Create a MPI SCSIIORequest |
| @@ -1313,7 +1312,7 @@ int mptscsih_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
| 1313 | * Returns 0. (rtn value discarded by linux scsi mid-layer) | 1312 | * Returns 0. (rtn value discarded by linux scsi mid-layer) |
| 1314 | */ | 1313 | */ |
| 1315 | int | 1314 | int |
| 1316 | mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 1315 | mptscsih_qcmd(struct scsi_cmnd *SCpnt) |
| 1317 | { | 1316 | { |
| 1318 | MPT_SCSI_HOST *hd; | 1317 | MPT_SCSI_HOST *hd; |
| 1319 | MPT_FRAME_HDR *mf; | 1318 | MPT_FRAME_HDR *mf; |
| @@ -1329,10 +1328,9 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
| 1329 | 1328 | ||
| 1330 | hd = shost_priv(SCpnt->device->host); | 1329 | hd = shost_priv(SCpnt->device->host); |
| 1331 | ioc = hd->ioc; | 1330 | ioc = hd->ioc; |
| 1332 | SCpnt->scsi_done = done; | ||
| 1333 | 1331 | ||
| 1334 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n", | 1332 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p\n", |
| 1335 | ioc->name, SCpnt, done)); | 1333 | ioc->name, SCpnt)); |
| 1336 | 1334 | ||
| 1337 | if (ioc->taskmgmt_quiesce_io) | 1335 | if (ioc->taskmgmt_quiesce_io) |
| 1338 | return SCSI_MLQUEUE_HOST_BUSY; | 1336 | return SCSI_MLQUEUE_HOST_BUSY; |
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index 83f503162f7a..99e3390807f3 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h | |||
| @@ -113,7 +113,7 @@ extern int mptscsih_resume(struct pci_dev *pdev); | |||
| 113 | #endif | 113 | #endif |
| 114 | extern int mptscsih_show_info(struct seq_file *, struct Scsi_Host *); | 114 | extern int mptscsih_show_info(struct seq_file *, struct Scsi_Host *); |
| 115 | extern const char * mptscsih_info(struct Scsi_Host *SChost); | 115 | extern const char * mptscsih_info(struct Scsi_Host *SChost); |
| 116 | extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)); | 116 | extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt); |
| 117 | extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, | 117 | extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, |
| 118 | u8 id, int lun, int ctx2abort, ulong timeout); | 118 | u8 id, int lun, int ctx2abort, ulong timeout); |
| 119 | extern void mptscsih_slave_destroy(struct scsi_device *device); | 119 | extern void mptscsih_slave_destroy(struct scsi_device *device); |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 5653e505f91f..49d11338294b 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
| @@ -780,33 +780,31 @@ static int mptspi_slave_configure(struct scsi_device *sdev) | |||
| 780 | } | 780 | } |
| 781 | 781 | ||
| 782 | static int | 782 | static int |
| 783 | mptspi_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 783 | mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) |
| 784 | { | 784 | { |
| 785 | struct _MPT_SCSI_HOST *hd = shost_priv(SCpnt->device->host); | 785 | struct _MPT_SCSI_HOST *hd = shost_priv(shost); |
| 786 | VirtDevice *vdevice = SCpnt->device->hostdata; | 786 | VirtDevice *vdevice = SCpnt->device->hostdata; |
| 787 | MPT_ADAPTER *ioc = hd->ioc; | 787 | MPT_ADAPTER *ioc = hd->ioc; |
| 788 | 788 | ||
| 789 | if (!vdevice || !vdevice->vtarget) { | 789 | if (!vdevice || !vdevice->vtarget) { |
| 790 | SCpnt->result = DID_NO_CONNECT << 16; | 790 | SCpnt->result = DID_NO_CONNECT << 16; |
| 791 | done(SCpnt); | 791 | SCpnt->scsi_done(SCpnt); |
| 792 | return 0; | 792 | return 0; |
| 793 | } | 793 | } |
| 794 | 794 | ||
| 795 | if (SCpnt->device->channel == 1 && | 795 | if (SCpnt->device->channel == 1 && |
| 796 | mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) { | 796 | mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) { |
| 797 | SCpnt->result = DID_NO_CONNECT << 16; | 797 | SCpnt->result = DID_NO_CONNECT << 16; |
| 798 | done(SCpnt); | 798 | SCpnt->scsi_done(SCpnt); |
| 799 | return 0; | 799 | return 0; |
| 800 | } | 800 | } |
| 801 | 801 | ||
| 802 | if (spi_dv_pending(scsi_target(SCpnt->device))) | 802 | if (spi_dv_pending(scsi_target(SCpnt->device))) |
| 803 | ddvprintk(ioc, scsi_print_command(SCpnt)); | 803 | ddvprintk(ioc, scsi_print_command(SCpnt)); |
| 804 | 804 | ||
| 805 | return mptscsih_qcmd(SCpnt,done); | 805 | return mptscsih_qcmd(SCpnt); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| 808 | static DEF_SCSI_QCMD(mptspi_qcmd) | ||
| 809 | |||
| 810 | static void mptspi_slave_destroy(struct scsi_device *sdev) | 808 | static void mptspi_slave_destroy(struct scsi_device *sdev) |
| 811 | { | 809 | { |
| 812 | struct scsi_target *starget = scsi_target(sdev); | 810 | struct scsi_target *starget = scsi_target(sdev); |
