Commit 4fe30ab2 authored by David Jeffery's avatar David Jeffery Committed by Linus Torvalds

[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.
parent 3e5f1270
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment