diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 17369f8ba88b..b1f68caf9a1d 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -647,8 +647,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
647 | VirtDevice *vdevice; | 647 | VirtDevice *vdevice; |
648 | VirtTarget *vtarget; | 648 | VirtTarget *vtarget; |
649 | 649 | ||
650 | hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; | 650 | hd = shost_priv(ioc->sh); |
651 | |||
652 | req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); | 651 | req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); |
653 | req_idx_MR = (mr != NULL) ? | 652 | req_idx_MR = (mr != NULL) ? |
654 | le16_to_cpu(mr->u.frame.hwhdr.msgctxu.fld.req_idx) : req_idx; | 653 | le16_to_cpu(mr->u.frame.hwhdr.msgctxu.fld.req_idx) : req_idx; |
@@ -1105,7 +1104,7 @@ mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSI | |||
1105 | return; | 1104 | return; |
1106 | if (sc->device->host == NULL) | 1105 | if (sc->device->host == NULL) |
1107 | return; | 1106 | return; |
1108 | if ((hd = (MPT_SCSI_HOST *)sc->device->host->hostdata) == NULL) | 1107 | if ((hd = shost_priv(sc->device->host)) == NULL) |
1109 | return; | 1108 | return; |
1110 | ioc = hd->ioc; | 1109 | ioc = hd->ioc; |
1111 | if (time - hd->last_queue_full > 10 * HZ) { | 1110 | if (time - hd->last_queue_full > 10 * HZ) { |
@@ -1137,7 +1136,7 @@ mptscsih_remove(struct pci_dev *pdev) | |||
1137 | 1136 | ||
1138 | scsi_remove_host(host); | 1137 | scsi_remove_host(host); |
1139 | 1138 | ||
1140 | if((hd = (MPT_SCSI_HOST *)host->hostdata) == NULL) | 1139 | if((hd = shost_priv(host)) == NULL) |
1141 | return; | 1140 | return; |
1142 | 1141 | ||
1143 | mptscsih_shutdown(pdev); | 1142 | mptscsih_shutdown(pdev); |
@@ -1174,15 +1173,6 @@ mptscsih_remove(struct pci_dev *pdev) | |||
1174 | void | 1173 | void |
1175 | mptscsih_shutdown(struct pci_dev *pdev) | 1174 | mptscsih_shutdown(struct pci_dev *pdev) |
1176 | { | 1175 | { |
1177 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | ||
1178 | struct Scsi_Host *host = ioc->sh; | ||
1179 | MPT_SCSI_HOST *hd; | ||
1180 | |||
1181 | if(!host) | ||
1182 | return; | ||
1183 | |||
1184 | hd = (MPT_SCSI_HOST *)host->hostdata; | ||
1185 | |||
1186 | } | 1176 | } |
1187 | 1177 | ||
1188 | #ifdef CONFIG_PM | 1178 | #ifdef CONFIG_PM |
@@ -1228,7 +1218,7 @@ mptscsih_info(struct Scsi_Host *SChost) | |||
1228 | MPT_SCSI_HOST *h; | 1218 | MPT_SCSI_HOST *h; |
1229 | int size = 0; | 1219 | int size = 0; |
1230 | 1220 | ||
1231 | h = (MPT_SCSI_HOST *)SChost->hostdata; | 1221 | h = shost_priv(SChost); |
1232 | 1222 | ||
1233 | if (h) { | 1223 | if (h) { |
1234 | if (h->info_kbuf == NULL) | 1224 | if (h->info_kbuf == NULL) |
@@ -1322,7 +1312,7 @@ int | |||
1322 | mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, | 1312 | mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, |
1323 | int length, int func) | 1313 | int length, int func) |
1324 | { | 1314 | { |
1325 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 1315 | MPT_SCSI_HOST *hd = shost_priv(host); |
1326 | MPT_ADAPTER *ioc = hd->ioc; | 1316 | MPT_ADAPTER *ioc = hd->ioc; |
1327 | int size = 0; | 1317 | int size = 0; |
1328 | 1318 | ||
@@ -1371,7 +1361,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
1371 | int ii; | 1361 | int ii; |
1372 | MPT_ADAPTER *ioc; | 1362 | MPT_ADAPTER *ioc; |
1373 | 1363 | ||
1374 | hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata; | 1364 | hd = shost_priv(SCpnt->device->host); |
1375 | ioc = hd->ioc; | 1365 | ioc = hd->ioc; |
1376 | lun = SCpnt->device->lun; | 1366 | lun = SCpnt->device->lun; |
1377 | SCpnt->scsi_done = done; | 1367 | SCpnt->scsi_done = done; |
@@ -1807,7 +1797,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) | |||
1807 | 1797 | ||
1808 | /* If we can't locate our host adapter structure, return FAILED status. | 1798 | /* If we can't locate our host adapter structure, return FAILED status. |
1809 | */ | 1799 | */ |
1810 | if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) { | 1800 | if ((hd = shost_priv(SCpnt->device->host)) == NULL) { |
1811 | SCpnt->result = DID_RESET << 16; | 1801 | SCpnt->result = DID_RESET << 16; |
1812 | SCpnt->scsi_done(SCpnt); | 1802 | SCpnt->scsi_done(SCpnt); |
1813 | printk(KERN_ERR MYNAM ": task abort: " | 1803 | printk(KERN_ERR MYNAM ": task abort: " |
@@ -1913,7 +1903,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt) | |||
1913 | 1903 | ||
1914 | /* If we can't locate our host adapter structure, return FAILED status. | 1904 | /* If we can't locate our host adapter structure, return FAILED status. |
1915 | */ | 1905 | */ |
1916 | if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ | 1906 | if ((hd = shost_priv(SCpnt->device->host)) == NULL){ |
1917 | printk(KERN_ERR MYNAM ": target reset: " | 1907 | printk(KERN_ERR MYNAM ": target reset: " |
1918 | "Can't locate host! (sc=%p)\n", SCpnt); | 1908 | "Can't locate host! (sc=%p)\n", SCpnt); |
1919 | return FAILED; | 1909 | return FAILED; |
@@ -1976,7 +1966,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt) | |||
1976 | 1966 | ||
1977 | /* If we can't locate our host adapter structure, return FAILED status. | 1967 | /* If we can't locate our host adapter structure, return FAILED status. |
1978 | */ | 1968 | */ |
1979 | if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ | 1969 | if ((hd = shost_priv(SCpnt->device->host)) == NULL){ |
1980 | printk(KERN_ERR MYNAM ": bus reset: " | 1970 | printk(KERN_ERR MYNAM ": bus reset: " |
1981 | "Can't locate host! (sc=%p)\n", SCpnt); | 1971 | "Can't locate host! (sc=%p)\n", SCpnt); |
1982 | return FAILED; | 1972 | return FAILED; |
@@ -2020,7 +2010,7 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt) | |||
2020 | MPT_ADAPTER *ioc; | 2010 | MPT_ADAPTER *ioc; |
2021 | 2011 | ||
2022 | /* If we can't locate the host to reset, then we failed. */ | 2012 | /* If we can't locate the host to reset, then we failed. */ |
2023 | if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ | 2013 | if ((hd = shost_priv(SCpnt->device->host)) == NULL){ |
2024 | printk(KERN_ERR MYNAM ": host reset: " | 2014 | printk(KERN_ERR MYNAM ": host reset: " |
2025 | "Can't locate host! (sc=%p)\n", SCpnt); | 2015 | "Can't locate host! (sc=%p)\n", SCpnt); |
2026 | return FAILED; | 2016 | return FAILED; |
@@ -2186,7 +2176,7 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m | |||
2186 | return 1; | 2176 | return 1; |
2187 | } | 2177 | } |
2188 | 2178 | ||
2189 | hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 2179 | hd = shost_priv(ioc->sh); |
2190 | pScsiTmReply = (SCSITaskMgmtReply_t*)mr; | 2180 | pScsiTmReply = (SCSITaskMgmtReply_t*)mr; |
2191 | pScsiTmReq = (SCSITaskMgmt_t*)mf; | 2181 | pScsiTmReq = (SCSITaskMgmt_t*)mf; |
2192 | tmType = pScsiTmReq->TaskType; | 2182 | tmType = pScsiTmReq->TaskType; |
@@ -2380,7 +2370,7 @@ void | |||
2380 | mptscsih_slave_destroy(struct scsi_device *sdev) | 2370 | mptscsih_slave_destroy(struct scsi_device *sdev) |
2381 | { | 2371 | { |
2382 | struct Scsi_Host *host = sdev->host; | 2372 | struct Scsi_Host *host = sdev->host; |
2383 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 2373 | MPT_SCSI_HOST *hd = shost_priv(host); |
2384 | VirtTarget *vtarget; | 2374 | VirtTarget *vtarget; |
2385 | VirtDevice *vdevice; | 2375 | VirtDevice *vdevice; |
2386 | struct scsi_target *starget; | 2376 | struct scsi_target *starget; |
@@ -2407,7 +2397,7 @@ mptscsih_slave_destroy(struct scsi_device *sdev) | |||
2407 | int | 2397 | int |
2408 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) | 2398 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) |
2409 | { | 2399 | { |
2410 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata; | 2400 | MPT_SCSI_HOST *hd = shost_priv(sdev->host); |
2411 | VirtTarget *vtarget; | 2401 | VirtTarget *vtarget; |
2412 | struct scsi_target *starget; | 2402 | struct scsi_target *starget; |
2413 | int max_depth; | 2403 | int max_depth; |
@@ -2452,7 +2442,7 @@ mptscsih_slave_configure(struct scsi_device *sdev) | |||
2452 | VirtTarget *vtarget; | 2442 | VirtTarget *vtarget; |
2453 | VirtDevice *vdevice; | 2443 | VirtDevice *vdevice; |
2454 | struct scsi_target *starget; | 2444 | struct scsi_target *starget; |
2455 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sh->hostdata; | 2445 | MPT_SCSI_HOST *hd = shost_priv(sh); |
2456 | MPT_ADAPTER *ioc = hd->ioc; | 2446 | MPT_ADAPTER *ioc = hd->ioc; |
2457 | 2447 | ||
2458 | starget = scsi_target(sdev); | 2448 | starget = scsi_target(sdev); |
@@ -2567,7 +2557,7 @@ SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc) | |||
2567 | MPT_SCSI_HOST *hd; | 2557 | MPT_SCSI_HOST *hd; |
2568 | int i; | 2558 | int i; |
2569 | 2559 | ||
2570 | hd = (MPT_SCSI_HOST *) sc->device->host->hostdata; | 2560 | hd = shost_priv(sc->device->host); |
2571 | 2561 | ||
2572 | for (i = 0; i < hd->ioc->req_depth; i++) { | 2562 | for (i = 0; i < hd->ioc->req_depth; i++) { |
2573 | if (hd->ScsiLookup[i] == sc) { | 2563 | if (hd->ScsiLookup[i] == sc) { |
@@ -2595,10 +2585,10 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
2595 | * before all scsi hosts have been attached, then an alt_ioc | 2585 | * before all scsi hosts have been attached, then an alt_ioc |
2596 | * may have a NULL sh pointer. | 2586 | * may have a NULL sh pointer. |
2597 | */ | 2587 | */ |
2598 | if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL)) | 2588 | if (ioc->sh == NULL || shost_priv(ioc->sh) == NULL) |
2599 | return 0; | 2589 | return 0; |
2600 | else | 2590 | else |
2601 | hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; | 2591 | hd = shost_priv(ioc->sh); |
2602 | 2592 | ||
2603 | if (reset_phase == MPT_IOC_SETUP_RESET) { | 2593 | if (reset_phase == MPT_IOC_SETUP_RESET) { |
2604 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Setup-Diag Reset\n", ioc->name)); | 2594 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Setup-Diag Reset\n", ioc->name)); |
@@ -2691,7 +2681,7 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) | |||
2691 | ioc->name, event)); | 2681 | ioc->name, event)); |
2692 | 2682 | ||
2693 | if (ioc->sh == NULL || | 2683 | if (ioc->sh == NULL || |
2694 | ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) | 2684 | ((hd = shost_priv(ioc->sh)) == NULL)) |
2695 | return 1; | 2685 | return 1; |
2696 | 2686 | ||
2697 | switch (event) { | 2687 | switch (event) { |
@@ -2770,7 +2760,7 @@ mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
2770 | int completionCode; | 2760 | int completionCode; |
2771 | u16 req_idx; | 2761 | u16 req_idx; |
2772 | 2762 | ||
2773 | hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; | 2763 | hd = shost_priv(ioc->sh); |
2774 | 2764 | ||
2775 | if ((mf == NULL) || | 2765 | if ((mf == NULL) || |
2776 | (mf >= MPT_INDEX_2_MFPTR(ioc, ioc->req_depth))) { | 2766 | (mf >= MPT_INDEX_2_MFPTR(ioc, ioc->req_depth))) { |
@@ -3254,7 +3244,7 @@ static ssize_t | |||
3254 | mptscsih_version_fw_show(struct class_device *cdev, char *buf) | 3244 | mptscsih_version_fw_show(struct class_device *cdev, char *buf) |
3255 | { | 3245 | { |
3256 | struct Scsi_Host *host = class_to_shost(cdev); | 3246 | struct Scsi_Host *host = class_to_shost(cdev); |
3257 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3247 | MPT_SCSI_HOST *hd = shost_priv(host); |
3258 | MPT_ADAPTER *ioc = hd->ioc; | 3248 | MPT_ADAPTER *ioc = hd->ioc; |
3259 | 3249 | ||
3260 | return snprintf(buf, PAGE_SIZE, "%02d.%02d.%02d.%02d\n", | 3250 | return snprintf(buf, PAGE_SIZE, "%02d.%02d.%02d.%02d\n", |
@@ -3269,7 +3259,7 @@ static ssize_t | |||
3269 | mptscsih_version_bios_show(struct class_device *cdev, char *buf) | 3259 | mptscsih_version_bios_show(struct class_device *cdev, char *buf) |
3270 | { | 3260 | { |
3271 | struct Scsi_Host *host = class_to_shost(cdev); | 3261 | struct Scsi_Host *host = class_to_shost(cdev); |
3272 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3262 | MPT_SCSI_HOST *hd = shost_priv(host); |
3273 | MPT_ADAPTER *ioc = hd->ioc; | 3263 | MPT_ADAPTER *ioc = hd->ioc; |
3274 | 3264 | ||
3275 | return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x.%02x\n", | 3265 | return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x.%02x\n", |
@@ -3284,7 +3274,7 @@ static ssize_t | |||
3284 | mptscsih_version_mpi_show(struct class_device *cdev, char *buf) | 3274 | mptscsih_version_mpi_show(struct class_device *cdev, char *buf) |
3285 | { | 3275 | { |
3286 | struct Scsi_Host *host = class_to_shost(cdev); | 3276 | struct Scsi_Host *host = class_to_shost(cdev); |
3287 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3277 | MPT_SCSI_HOST *hd = shost_priv(host); |
3288 | MPT_ADAPTER *ioc = hd->ioc; | 3278 | MPT_ADAPTER *ioc = hd->ioc; |
3289 | 3279 | ||
3290 | return snprintf(buf, PAGE_SIZE, "%03x\n", ioc->facts.MsgVersion); | 3280 | return snprintf(buf, PAGE_SIZE, "%03x\n", ioc->facts.MsgVersion); |
@@ -3295,7 +3285,7 @@ static ssize_t | |||
3295 | mptscsih_version_product_show(struct class_device *cdev, char *buf) | 3285 | mptscsih_version_product_show(struct class_device *cdev, char *buf) |
3296 | { | 3286 | { |
3297 | struct Scsi_Host *host = class_to_shost(cdev); | 3287 | struct Scsi_Host *host = class_to_shost(cdev); |
3298 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3288 | MPT_SCSI_HOST *hd = shost_priv(host); |
3299 | MPT_ADAPTER *ioc = hd->ioc; | 3289 | MPT_ADAPTER *ioc = hd->ioc; |
3300 | 3290 | ||
3301 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->prod_name); | 3291 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->prod_name); |
@@ -3307,7 +3297,7 @@ static ssize_t | |||
3307 | mptscsih_version_nvdata_persistent_show(struct class_device *cdev, char *buf) | 3297 | mptscsih_version_nvdata_persistent_show(struct class_device *cdev, char *buf) |
3308 | { | 3298 | { |
3309 | struct Scsi_Host *host = class_to_shost(cdev); | 3299 | struct Scsi_Host *host = class_to_shost(cdev); |
3310 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3300 | MPT_SCSI_HOST *hd = shost_priv(host); |
3311 | MPT_ADAPTER *ioc = hd->ioc; | 3301 | MPT_ADAPTER *ioc = hd->ioc; |
3312 | 3302 | ||
3313 | return snprintf(buf, PAGE_SIZE, "%02xh\n", | 3303 | return snprintf(buf, PAGE_SIZE, "%02xh\n", |
@@ -3320,7 +3310,7 @@ static ssize_t | |||
3320 | mptscsih_version_nvdata_default_show(struct class_device *cdev, char *buf) | 3310 | mptscsih_version_nvdata_default_show(struct class_device *cdev, char *buf) |
3321 | { | 3311 | { |
3322 | struct Scsi_Host *host = class_to_shost(cdev); | 3312 | struct Scsi_Host *host = class_to_shost(cdev); |
3323 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3313 | MPT_SCSI_HOST *hd = shost_priv(host); |
3324 | MPT_ADAPTER *ioc = hd->ioc; | 3314 | MPT_ADAPTER *ioc = hd->ioc; |
3325 | 3315 | ||
3326 | return snprintf(buf, PAGE_SIZE, "%02xh\n",ioc->nvdata_version_default); | 3316 | return snprintf(buf, PAGE_SIZE, "%02xh\n",ioc->nvdata_version_default); |
@@ -3332,7 +3322,7 @@ static ssize_t | |||
3332 | mptscsih_board_name_show(struct class_device *cdev, char *buf) | 3322 | mptscsih_board_name_show(struct class_device *cdev, char *buf) |
3333 | { | 3323 | { |
3334 | struct Scsi_Host *host = class_to_shost(cdev); | 3324 | struct Scsi_Host *host = class_to_shost(cdev); |
3335 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3325 | MPT_SCSI_HOST *hd = shost_priv(host); |
3336 | MPT_ADAPTER *ioc = hd->ioc; | 3326 | MPT_ADAPTER *ioc = hd->ioc; |
3337 | 3327 | ||
3338 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_name); | 3328 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_name); |
@@ -3343,7 +3333,7 @@ static ssize_t | |||
3343 | mptscsih_board_assembly_show(struct class_device *cdev, char *buf) | 3333 | mptscsih_board_assembly_show(struct class_device *cdev, char *buf) |
3344 | { | 3334 | { |
3345 | struct Scsi_Host *host = class_to_shost(cdev); | 3335 | struct Scsi_Host *host = class_to_shost(cdev); |
3346 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3336 | MPT_SCSI_HOST *hd = shost_priv(host); |
3347 | MPT_ADAPTER *ioc = hd->ioc; | 3337 | MPT_ADAPTER *ioc = hd->ioc; |
3348 | 3338 | ||
3349 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_assembly); | 3339 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_assembly); |
@@ -3355,7 +3345,7 @@ static ssize_t | |||
3355 | mptscsih_board_tracer_show(struct class_device *cdev, char *buf) | 3345 | mptscsih_board_tracer_show(struct class_device *cdev, char *buf) |
3356 | { | 3346 | { |
3357 | struct Scsi_Host *host = class_to_shost(cdev); | 3347 | struct Scsi_Host *host = class_to_shost(cdev); |
3358 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3348 | MPT_SCSI_HOST *hd = shost_priv(host); |
3359 | MPT_ADAPTER *ioc = hd->ioc; | 3349 | MPT_ADAPTER *ioc = hd->ioc; |
3360 | 3350 | ||
3361 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_tracer); | 3351 | return snprintf(buf, PAGE_SIZE, "%s\n", ioc->board_tracer); |
@@ -3367,7 +3357,7 @@ static ssize_t | |||
3367 | mptscsih_io_delay_show(struct class_device *cdev, char *buf) | 3357 | mptscsih_io_delay_show(struct class_device *cdev, char *buf) |
3368 | { | 3358 | { |
3369 | struct Scsi_Host *host = class_to_shost(cdev); | 3359 | struct Scsi_Host *host = class_to_shost(cdev); |
3370 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3360 | MPT_SCSI_HOST *hd = shost_priv(host); |
3371 | MPT_ADAPTER *ioc = hd->ioc; | 3361 | MPT_ADAPTER *ioc = hd->ioc; |
3372 | 3362 | ||
3373 | return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->io_missing_delay); | 3363 | return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->io_missing_delay); |
@@ -3379,7 +3369,7 @@ static ssize_t | |||
3379 | mptscsih_device_delay_show(struct class_device *cdev, char *buf) | 3369 | mptscsih_device_delay_show(struct class_device *cdev, char *buf) |
3380 | { | 3370 | { |
3381 | struct Scsi_Host *host = class_to_shost(cdev); | 3371 | struct Scsi_Host *host = class_to_shost(cdev); |
3382 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3372 | MPT_SCSI_HOST *hd = shost_priv(host); |
3383 | MPT_ADAPTER *ioc = hd->ioc; | 3373 | MPT_ADAPTER *ioc = hd->ioc; |
3384 | 3374 | ||
3385 | return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->device_missing_delay); | 3375 | return snprintf(buf, PAGE_SIZE, "%02d\n", ioc->device_missing_delay); |
@@ -3391,7 +3381,7 @@ static ssize_t | |||
3391 | mptscsih_debug_level_show(struct class_device *cdev, char *buf) | 3381 | mptscsih_debug_level_show(struct class_device *cdev, char *buf) |
3392 | { | 3382 | { |
3393 | struct Scsi_Host *host = class_to_shost(cdev); | 3383 | struct Scsi_Host *host = class_to_shost(cdev); |
3394 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3384 | MPT_SCSI_HOST *hd = shost_priv(host); |
3395 | MPT_ADAPTER *ioc = hd->ioc; | 3385 | MPT_ADAPTER *ioc = hd->ioc; |
3396 | 3386 | ||
3397 | return snprintf(buf, PAGE_SIZE, "%08xh\n", ioc->debug_level); | 3387 | return snprintf(buf, PAGE_SIZE, "%08xh\n", ioc->debug_level); |
@@ -3401,7 +3391,7 @@ mptscsih_debug_level_store(struct class_device *cdev, const char *buf, | |||
3401 | size_t count) | 3391 | size_t count) |
3402 | { | 3392 | { |
3403 | struct Scsi_Host *host = class_to_shost(cdev); | 3393 | struct Scsi_Host *host = class_to_shost(cdev); |
3404 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 3394 | MPT_SCSI_HOST *hd = shost_priv(host); |
3405 | MPT_ADAPTER *ioc = hd->ioc; | 3395 | MPT_ADAPTER *ioc = hd->ioc; |
3406 | int val = 0; | 3396 | int val = 0; |
3407 | 3397 | ||