From 4fe30ab206b5c8919c3b30138f3f9b63781cc353 Mon Sep 17 00:00:00 2001 From: David Jeffery Date: Wed, 12 Feb 2003 18:44:25 -0800 Subject: [PATCH] [PATCH] ips: missing reboot notifier and Mode Sense P8 This adds back the reboot_notifier hook that was accidentally removed in the last set of patches. It also adds support handle a Mode Page 8 command so the scsi layer won't complain anymore. And the movement to using ->device to get scsi numbers resulted in 2 typos in debug code. These are also fixed. --- drivers/scsi/ips.c | 12 +++++++++--- drivers/scsi/ips.h | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 40c270c0e823..c5412db03762 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -3375,8 +3375,8 @@ ips_map_status(ips_ha_t *ha, ips_scb_t *scb, ips_stat_t *sp) { ips_name, ha->host_num, scb->scsi_cmd->device->channel, - scb->scsi_cmd->channel->id, - scb->scsi_cmd->channel->lun, + scb->scsi_cmd->device->id, + scb->scsi_cmd->device->lun, scb->basic_status, scb->extended_status, scb->extended_status == IPS_ERR_CKCOND ? scb->dcdb.sense_info[2] & 0xf : 0, @@ -4223,6 +4223,12 @@ ips_msense(ips_ha_t *ha, ips_scb_t *scb) { mdata.pdata.pg4.RotationalOffset = 0; mdata.pdata.pg4.MediumRotationRate = 0; break; + case 0x8: + mdata.pdata.pg8.PageCode = 8; + mdata.pdata.pg8.PageLength = sizeof(IPS_SCSI_MODE_PAGE8); + mdata.hdr.DataLength = 3 + mdata.hdr.BlockDescLength + mdata.pdata.pg8.PageLength; + /* everything else is left set to 0 */ + break; default: return (0); @@ -6797,7 +6803,7 @@ ips_module_init(void){ pci_unregister_driver(&ips_pci_driver); return -ENODEV; } - + register_reboot_notifier(&ips_notifier); return 0; } diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h index 3f6fc724d330..5ff590651d82 100644 --- a/drivers/scsi/ips.h +++ b/drivers/scsi/ips.h @@ -958,6 +958,20 @@ typedef struct { uint8_t Reserved2[2]; } IPS_SCSI_MODE_PAGE4; +/* + * Sense Data Format - Page 8 + */ +typedef struct { + uint8_t PageCode; + uint8_t PageLength; + uint8_t flags; + uint8_t RetentPrio; + uint16_t DisPrefetchLen; + uint16_t MinPrefetchLen; + uint16_t MaxPrefetchLen; + uint16_t MaxPrefetchCeiling; +} IPS_SCSI_MODE_PAGE8; + /* * Sense Data Format - Block Descriptor (DASD) */ @@ -985,6 +999,7 @@ typedef struct { union { IPS_SCSI_MODE_PAGE3 pg3; IPS_SCSI_MODE_PAGE4 pg4; + IPS_SCSI_MODE_PAGE8 pg8; } pdata; } IPS_SCSI_MODE_PAGE_DATA; -- 2.39.5