X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fscsi%2Fpcmcia%2Fnsp_cs.c;h=3d2f71051fe53313e1d6f0f946106bcb5c7c5a90;hb=422c0d61d591cbfb70f029e13505fb437e169d68;hp=91b3f28e7a19ddc3dd66942124c7bd5cd2fc786c;hpb=54522b6613a03807f057fd567794a31267ef85cb;p=powerpc.git diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 91b3f28e7a..3d2f71051f 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c @@ -51,7 +51,6 @@ #include #include -#include #include #include #include @@ -202,7 +201,7 @@ static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) #ifdef NSP_DEBUG /*unsigned int host_id = SCpnt->device->host->this_id;*/ /*unsigned int base = SCpnt->device->host->io_port;*/ - unsigned char target = SCpnt->device->id; + unsigned char target = scmd_id(SCpnt); #endif nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; @@ -374,7 +373,7 @@ static int nsphw_start_selection(Scsi_Cmnd *SCpnt) { unsigned int host_id = SCpnt->device->host->this_id; unsigned int base = SCpnt->device->host->io_port; - unsigned char target = SCpnt->device->id; + unsigned char target = scmd_id(SCpnt); nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; int time_out; unsigned char phase, arbit; @@ -453,7 +452,7 @@ static struct nsp_sync_table nsp_sync_table_20M[] = { */ static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) { - unsigned char target = SCpnt->device->id; + unsigned char target = scmd_id(SCpnt); // unsigned char lun = SCpnt->device->lun; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; sync_data *sync = &(data->Sync[target]); @@ -678,7 +677,7 @@ static int nsp_reselected(Scsi_Cmnd *SCpnt) target++; } - if (SCpnt->device->id != target) { + if (scmd_id(SCpnt) != target) { nsp_msg(KERN_ERR, "XXX: reselect ID must be %d in this implementation.", target); } @@ -913,7 +912,7 @@ static void nsp_pio_write(Scsi_Cmnd *SCpnt) static int nsp_nexus(Scsi_Cmnd *SCpnt) { unsigned int base = SCpnt->device->host->io_port; - unsigned char target = SCpnt->device->id; + unsigned char target = scmd_id(SCpnt); // unsigned char lun = SCpnt->device->lun; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; sync_data *sync = &(data->Sync[target]); @@ -1642,11 +1641,6 @@ static dev_link_t *nsp_cs_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME ; - client_reg.event_handler = &nsp_cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -2138,12 +2132,13 @@ static struct pcmcia_device_id nsp_cs_ids[] = { MODULE_DEVICE_TABLE(pcmcia, nsp_cs_ids); static struct pcmcia_driver nsp_driver = { - .owner = THIS_MODULE, - .drv = { - .name = "nsp_cs", + .owner = THIS_MODULE, + .drv = { + .name = "nsp_cs", }, - .attach = nsp_cs_attach, - .detach = nsp_cs_detach, + .attach = nsp_cs_attach, + .event = nsp_cs_event, + .detach = nsp_cs_detach, .id_table = nsp_cs_ids, }; #endif