diff options
author | James Bottomley <jejb@titanic> | 2005-04-18 13:45:00 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic> | 2005-04-18 13:45:00 -0500 |
commit | c46f2ffb9e7fce7208c2639790e1ade42e00b146 (patch) | |
tree | 284912295d46a861930d0619788a650f56c2a29b /drivers | |
parent | c2a9331c62216e222a08de8dd58559367fef0af6 (diff) | |
parent | f59114b7b5dc677bbd7cc7e26a5fcb3572a3445c (diff) |
merge by hand (scsi_device.h)
Diffstat (limited to 'drivers')
35 files changed, 173 insertions, 308 deletions
diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c index 689527a89de7..681871ca5d60 100644 --- a/drivers/block/scsi_ioctl.c +++ b/drivers/block/scsi_ioctl.c @@ -328,11 +328,6 @@ static int sg_io(struct file *file, request_queue_t *q, return 0; } -#define FORMAT_UNIT_TIMEOUT (2 * 60 * 60 * HZ) -#define START_STOP_TIMEOUT (60 * HZ) -#define MOVE_MEDIUM_TIMEOUT (5 * 60 * HZ) -#define READ_ELEMENT_STATUS_TIMEOUT (5 * 60 * HZ) -#define READ_DEFECT_DATA_TIMEOUT (60 * HZ ) #define OMAX_SB_LEN 16 /* For backward compatibility */ static int sg_scsi_ioctl(struct file *file, request_queue_t *q, diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 5fc5004ea07a..1fb5cdf67f8f 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c @@ -54,6 +54,9 @@ extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int); +static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, + unsigned long arg); + static spinlock_t i2o_config_lock; #define MODINC(x,y) ((x) = ((x) + 1) % (y)) @@ -538,8 +541,7 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp) } #ifdef CONFIG_COMPAT -static int i2o_cfg_passthru32(unsigned fd, unsigned cmnd, unsigned long arg, - struct file *file) +static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long arg) { struct i2o_cmd_passthru32 __user *cmd; struct i2o_controller *c; @@ -752,7 +754,26 @@ static int i2o_cfg_passthru32(unsigned fd, unsigned cmnd, unsigned long arg, return rcode; } -#else +static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) +{ + int ret; + lock_kernel(); + switch (cmd) { + case I2OGETIOPS: + ret = i2o_cfg_ioctl(NULL, file, cmd, arg); + break; + case I2OPASSTHRU32: + ret = i2o_cfg_passthru32(file, cmd, arg); + break; + default: + ret = -ENOIOCTLCMD; + break; + } + unlock_kernel(); + return ret; +} + +#endif static int i2o_cfg_passthru(unsigned long arg) { @@ -958,7 +979,6 @@ static int i2o_cfg_passthru(unsigned long arg) kfree(reply); return rcode; } -#endif /* * IOCTL Handler @@ -1013,11 +1033,9 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, ret = i2o_cfg_evt_get(arg, fp); break; -#ifndef CONFIG_COMPAT case I2OPASSTHRU: ret = i2o_cfg_passthru(arg); break; -#endif default: osm_debug("unknown ioctl called!\n"); @@ -1105,6 +1123,9 @@ static struct file_operations config_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = i2o_cfg_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = i2o_cfg_compat_ioctl, +#endif .open = cfg_open, .release = cfg_release, .fasync = cfg_fasync, @@ -1134,19 +1155,11 @@ static int __init i2o_config_init(void) misc_deregister(&i2o_miscdev); return -EBUSY; } -#ifdef CONFIG_COMPAT - register_ioctl32_conversion(I2OPASSTHRU32, i2o_cfg_passthru32); - register_ioctl32_conversion(I2OGETIOPS, (void *)sys_ioctl); -#endif return 0; } static void i2o_config_exit(void) { -#ifdef CONFIG_COMPAT - unregister_ioctl32_conversion(I2OPASSTHRU32); - unregister_ioctl32_conversion(I2OGETIOPS); -#endif misc_deregister(&i2o_miscdev); i2o_driver_unregister(&i2o_config_driver); } diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ce398aa9e019..1f9aeb4accc6 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -88,10 +88,10 @@ MODULE_DESCRIPTION ("FCP (SCSI over Fibre Channel) HBA driver for IBM eServer zSeries"); MODULE_LICENSE("GPL"); -module_param(device, charp, 0); +module_param(device, charp, 0400); MODULE_PARM_DESC(device, "specify initial device"); -module_param(loglevel, uint, 0); +module_param(loglevel, uint, 0400); MODULE_PARM_DESC(loglevel, "log levels, 8 nibbles: " "FC ERP QDIO CIO Config FSF SCSI Other, " diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 53fcccbb424c..0afa1c4696ca 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h @@ -70,7 +70,7 @@ /********************* GENERAL DEFINES *********************************/ /* zfcp version number, it consists of major, minor, and patch-level number */ -#define ZFCP_VERSION "4.2.0" +#define ZFCP_VERSION "4.3.0" /** * zfcp_sg_to_address - determine kernel address from struct scatterlist @@ -851,6 +851,9 @@ struct zfcp_adapter { wwn_t wwnn; /* WWNN */ wwn_t wwpn; /* WWPN */ fc_id_t s_id; /* N_Port ID */ + wwn_t peer_wwnn; /* P2P peer WWNN */ + wwn_t peer_wwpn; /* P2P peer WWPN */ + fc_id_t peer_d_id; /* P2P peer D_ID */ struct ccw_device *ccw_device; /* S/390 ccw device */ u8 fc_service_class; u32 fc_topology; /* FC topology */ diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index cfc0d8c588df..53ebc1cdfe2d 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -2568,6 +2568,23 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action) case ZFCP_ERP_STEP_UNINITIALIZED: case ZFCP_ERP_STEP_PHYS_PORT_CLOSING: case ZFCP_ERP_STEP_PORT_CLOSING: + if (adapter->fc_topology == FSF_TOPO_P2P) { + if (port->wwpn != adapter->peer_wwpn) { + ZFCP_LOG_NORMAL("Failed to open port 0x%016Lx " + "on adapter %s.\nPeer WWPN " + "0x%016Lx does not match\n", + port->wwpn, + zfcp_get_busid_by_adapter(adapter), + adapter->peer_wwpn); + zfcp_erp_port_failed(port); + retval = ZFCP_ERP_FAILED; + break; + } + port->d_id = adapter->peer_d_id; + atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status); + retval = zfcp_erp_port_strategy_open_port(erp_action); + break; + } if (!(adapter->nameserver_port)) { retval = zfcp_nameserver_enqueue(adapter); if (retval != 0) { @@ -3516,8 +3533,9 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) debug_text_event(adapter->erp_dbf, 3, "a_access_unblock"); debug_event(adapter->erp_dbf, 3, &adapter->name, 8); - zfcp_erp_port_access_changed(adapter->nameserver_port); read_lock_irqsave(&zfcp_data.config_lock, flags); + if (adapter->nameserver_port) + zfcp_erp_port_access_changed(adapter->nameserver_port); list_for_each_entry(port, &adapter->port_list_head, list) if (port != adapter->nameserver_port) zfcp_erp_port_access_changed(port); diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 578b9fbe5206..148b11c822bf 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2107,6 +2107,9 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) bottom->low_qtcb_version, bottom->high_qtcb_version); adapter->fsf_lic_version = bottom->lic_version; adapter->supported_features = bottom->supported_features; + adapter->peer_wwpn = 0; + adapter->peer_wwnn = 0; + adapter->peer_d_id = 0; if (xchg_ok) { adapter->wwnn = bottom->nport_serv_param.wwnn; @@ -2124,13 +2127,19 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) adapter->hydra_version = 0; } + if (adapter->fc_topology == FSF_TOPO_P2P) { + adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK; + adapter->peer_wwpn = bottom->plogi_payload.wwpn; + adapter->peer_wwnn = bottom->plogi_payload.wwnn; + } + if(adapter->supported_features & FSF_FEATURE_HBAAPI_MANAGEMENT){ adapter->hardware_version = bottom->hardware_version; memcpy(adapter->serial_number, bottom->serial_number, 17); EBCASC(adapter->serial_number, sizeof(adapter->serial_number)); } - ZFCP_LOG_INFO("The adapter %s reported the following characteristics:\n" + ZFCP_LOG_NORMAL("The adapter %s reported the following characteristics:\n" "WWNN 0x%016Lx, " "WWPN 0x%016Lx, " "S_ID 0x%08x,\n" @@ -2194,14 +2203,18 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) switch (adapter->fc_topology) { case FSF_TOPO_P2P: ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n"); - ZFCP_LOG_NORMAL("error: Point-to-point fibrechannel " - "configuration detected at adapter %s " - "unsupported, shutting down adapter\n", - zfcp_get_busid_by_adapter(adapter)); + ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " + "configuration detected at adapter %s\n" + "Peer WWNN 0x%016llx, " + "peer WWPN 0x%016llx, " + "peer d_id 0x%06x\n", + zfcp_get_busid_by_adapter(adapter), + adapter->peer_wwnn, + adapter->peer_wwpn, + adapter->peer_d_id); debug_text_event(fsf_req->adapter->erp_dbf, 0, "top-p-to-p"); - zfcp_erp_adapter_shutdown(adapter, 0); - return -EIO; + break; case FSF_TOPO_AL: ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n"); ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " @@ -2226,6 +2239,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) "of a type known to the zfcp " "driver, shutting down adapter\n", zfcp_get_busid_by_adapter(adapter)); + adapter->fc_topology = FSF_TOPO_ERROR; debug_text_exception(fsf_req->adapter->erp_dbf, 0, "unknown-topo"); zfcp_erp_adapter_shutdown(adapter, 0); @@ -4281,6 +4295,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) bottom.io.fcp_cmnd, FSF_FCP_CMND_SIZE); zfcp_cmd_dbf_event_fsf("undeffcp", fsf_req, NULL, 0); set_host_byte(&scpnt->result, DID_ERROR); + goto skip_fsfstatus; } } @@ -4334,7 +4349,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) scpnt->resid = fcp_rsp_iu->fcp_resid; if (scpnt->request_bufflen - scpnt->resid < scpnt->underflow) - scpnt->result |= DID_ERROR << 16; + set_host_byte(&scpnt->result, DID_ERROR); } skip_fsfstatus: @@ -4607,6 +4622,13 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) { switch (header->fsf_status_qual.word[0]) { + case FSF_SQ_CFDC_HARDENED_ON_SE: + ZFCP_LOG_NORMAL( + "CFDC on the adapter %s has being " + "hardened on primary and secondary SE\n", + zfcp_get_busid_by_adapter(adapter)); + break; + case FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE: ZFCP_LOG_NORMAL( "CFDC of the adapter %s could not " diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h index 5889956bbf08..07140dfda2a7 100644 --- a/drivers/s390/scsi/zfcp_fsf.h +++ b/drivers/s390/scsi/zfcp_fsf.h @@ -129,6 +129,7 @@ #define FSF_SQ_NO_RETRY_POSSIBLE 0x07 /* FSF status qualifier for CFDC commands */ +#define FSF_SQ_CFDC_HARDENED_ON_SE 0x00000000 #define FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE 0x00000001 #define FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE2 0x00000002 /* CFDC subtable codes */ @@ -357,7 +358,6 @@ struct fsf_nport_serv_param { u8 class3_serv_param[16]; u8 class4_serv_param[16]; u8 vendor_version_level[16]; - u8 res1[16]; } __attribute__ ((packed)); struct fsf_plogi { @@ -415,11 +415,13 @@ struct fsf_qtcb_bottom_config { u8 res2[12]; u32 s_id; struct fsf_nport_serv_param nport_serv_param; + u8 reserved_nport_serv_param[16]; u8 res3[8]; u32 adapter_ports; u32 hardware_version; u8 serial_number[32]; - u8 res4[272]; + struct fsf_nport_serv_param plogi_payload; + u8 res4[160]; } __attribute__ ((packed)); struct fsf_qtcb_bottom_port { diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c index ff28ade1dfc7..23e2dca55bb8 100644 --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c @@ -65,6 +65,9 @@ ZFCP_DEFINE_ADAPTER_ATTR(status, "0x%08x\n", atomic_read(&adapter->status)); ZFCP_DEFINE_ADAPTER_ATTR(wwnn, "0x%016llx\n", adapter->wwnn); ZFCP_DEFINE_ADAPTER_ATTR(wwpn, "0x%016llx\n", adapter->wwpn); ZFCP_DEFINE_ADAPTER_ATTR(s_id, "0x%06x\n", adapter->s_id); +ZFCP_DEFINE_ADAPTER_ATTR(peer_wwnn, "0x%016llx\n", adapter->peer_wwnn); +ZFCP_DEFINE_ADAPTER_ATTR(peer_wwpn, "0x%016llx\n", adapter->peer_wwpn); +ZFCP_DEFINE_ADAPTER_ATTR(peer_d_id, "0x%06x\n", adapter->peer_d_id); ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version); ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version); ZFCP_DEFINE_ADAPTER_ATTR(fc_link_speed, "%d Gb/s\n", adapter->fc_link_speed); @@ -255,6 +258,9 @@ static struct attribute *zfcp_adapter_attrs[] = { &dev_attr_wwnn.attr, &dev_attr_wwpn.attr, &dev_attr_s_id.attr, + &dev_attr_peer_wwnn.attr, + &dev_attr_peer_wwpn.attr, + &dev_attr_peer_d_id.attr, &dev_attr_card_version.attr, &dev_attr_lic_version.attr, &dev_attr_fc_link_speed.attr, diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index 8ead55f75d02..2341d27ceed7 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c @@ -280,6 +280,7 @@ #endif #include "scsi.h" +#include <scsi/scsi_dbg.h> #include <scsi/scsi_host.h> #include "53c7xx.h" #include <linux/stat.h> @@ -1721,9 +1722,9 @@ NCR53c7xx_run_tests (struct Scsi_Host *host) { printk ("scsi%d : test 2 INQUIRY to target %d, lun 0 : %s\n", host->host_no, i, data + 8); printk ("scsi%d : status ", host->host_no); - print_status (status); + scsi_print_status (status); printk ("\nscsi%d : message ", host->host_no); - print_msg (&msg); + scsi_print_msg (&msg); printk ("\n"); } else if (hostdata->test_completed == 3) { printk("scsi%d : test 2 no connection with target %d\n", @@ -2312,7 +2313,7 @@ NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct printk ("scsi%d : received message", host->host_no); if (c) printk (" from target %d lun %d ", c->device->id, c->device->lun); - print_msg ((unsigned char *) hostdata->msg_buf); + scsi_print_msg ((unsigned char *) hostdata->msg_buf); printk("\n"); } @@ -3204,7 +3205,7 @@ create_cmd (Scsi_Cmnd *cmd) { case WRITE_10: #if 0 printk("scsi%d : command is ", host->host_no); - print_command(cmd->cmnd); + __scsi_print_command(cmd->cmnd); #endif #if 0 printk ("scsi%d : %d scatter/gather segments\n", host->host_no, @@ -3232,7 +3233,7 @@ create_cmd (Scsi_Cmnd *cmd) { */ default: printk("scsi%d : datain+dataout for command ", host->host_no); - print_command(cmd->cmnd); + __scsi_print_command(cmd->cmnd); datain = dataout = 2 * (cmd->use_sg ? cmd->use_sg : 1) + 3; } @@ -3938,7 +3939,7 @@ intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) { if (cmd) { printk("scsi%d : target %d, lun %d, command ", host->host_no, cmd->cmd->device->id, cmd->cmd->device->lun); - print_command (cmd->cmd->cmnd); + __scsi_print_command (cmd->cmd->cmnd); printk("scsi%d : dsp = 0x%x (virt 0x%p)\n", host->host_no, NCR53c7x0_read32(DSP_REG), bus_to_virt(NCR53c7x0_read32(DSP_REG))); @@ -4208,7 +4209,7 @@ restart: if (hostdata->options & OPTION_DEBUG_INTR) { printk ("scsi%d : command complete : pid %lu, id %d,lun %d result 0x%x ", host->host_no, tmp->pid, tmp->device->id, tmp->device->lun, tmp->result); - print_command (tmp->cmnd); + __scsi_print_command (tmp->cmnd); } tmp->scsi_done(tmp); @@ -4297,7 +4298,7 @@ NCR53c7x0_intr (int irq, void *dev_id, struct pt_regs * regs) printk("scsi%d : interrupt for pid %lu, id %d, lun %d ", host->host_no, cmd->cmd->pid, (int) cmd->cmd->device->id, (int) cmd->cmd->device->lun); - print_command (cmd->cmd->cmnd); + __scsi_print_command (cmd->cmd->cmnd); } else { printk("scsi%d : no active command\n", host->host_no); } @@ -5539,7 +5540,7 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) { i > 0 && !check_address ((unsigned long) ptr, 1); ptr += len, i -= len) { printk(" "); - len = print_msg (ptr); + len = scsi_print_msg (ptr); printk("\n"); if (!len) break; @@ -5554,7 +5555,7 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) { if (cmd) { printk(" result = 0x%x, target = %d, lun = %d, cmd = ", cmd->result, cmd->device->id, cmd->device->lun); - print_command(cmd->cmnd); + __scsi_print_command(cmd->cmnd); } else printk("\n"); printk(" + %d : dsa_next = 0x%x\n", hostdata->dsa_next, @@ -6028,7 +6029,7 @@ dump_events (struct Scsi_Host *host, int count) { virt_to_bus(event.dsa), event.dsa); if (event.pid != -1) { printk (" event for pid %ld ", event.pid); - print_command (event.cmnd); + __scsi_print_command (event.cmnd); } } } diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 41b5197ce4e6..15e4b122d56e 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2958,13 +2958,6 @@ static int BusLogic_AbortCommand(struct scsi_cmnd *Command) struct BusLogic_CCB *CCB; BusLogic_IncrementErrorCounter(&HostAdapter->TargetStatistics[TargetID].CommandAbortsRequested); /* - If this Command has already completed, then no Abort is necessary. - */ - if (Command->serial_number != Command->serial_number_at_timeout) { - BusLogic_Warning("Unable to Abort Command to Target %d - " "Already Completed\n", HostAdapter, TargetID); - return SUCCESS; - } - /* Attempt to find an Active CCB for this Command. If no Active CCB for this Command is found, then no Abort is necessary. */ diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 5e71a0beafca..770fa841e389 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -86,6 +86,7 @@ * 5. Test linked command handling code after Eric is ready with * the high level code. */ +#include <scsi/scsi_dbg.h> #if (NDEBUG & NDEBUG_LISTS) #define LIST(x,y) {printk("LINE:%d Adding %p to %p\n", __LINE__, (void*)(x), (void*)(y)); if ((x)==(y)) udelay(5); } @@ -2371,7 +2372,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { * 3..length+1 arguments * * Start the extended message buffer with the EXTENDED_MESSAGE - * byte, since print_msg() wants the whole thing. + * byte, since scsi_print_msg() wants the whole thing. */ extended_msg[0] = EXTENDED_MESSAGE; /* Accept first byte by clearing ACK */ @@ -2418,7 +2419,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { default: if (!tmp) { printk("scsi%d: rejecting message ", instance->host_no); - print_msg(extended_msg); + scsi_print_msg(extended_msg); printk("\n"); } else if (tmp != EXTENDED_MESSAGE) printk("scsi%d: rejecting unknown message %02x from target %d, lun %d\n", instance->host_no, tmp, cmd->device->id, cmd->device->lun); @@ -2552,7 +2553,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { if (!(msg[0] & 0x80)) { printk(KERN_ERR "scsi%d : expecting IDENTIFY message, got ", instance->host_no); - print_msg(msg); + scsi_print_msg(msg); abort = 1; } else { /* Accept message by clearing ACK */ @@ -2677,7 +2678,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { Scsi_Cmnd *tmp, **prev; printk(KERN_WARNING "scsi%d : aborting command\n", instance->host_no); - print_Scsi_Cmnd(cmd); + scsi_print_command(cmd); NCR5380_print_status(instance); diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9962c51dc2a7..04cb5c405a2d 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -9198,16 +9198,13 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s) s->use_sg, s->sglist_len, s->abort_reason); printk( -" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n", - (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout, - s->retries, s->allowed); +" serial_number 0x%x, retries %d, allowed %d\n", + (unsigned) s->serial_number, s->retries, s->allowed); printk( " timeout_per_command %d, timeout_total %d, timeout %d\n", s->timeout_per_command, s->timeout_total, s->timeout); - printk(" internal_timeout %u\n", s->internal_timeout); - printk( " scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n", (ulong) s->scsi_done, (ulong) s->done, diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index d7b8efe86401..88d119f4b970 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -257,6 +257,7 @@ #include <scsi/scsicam.h> #include "scsi.h" +#include <scsi/scsi_dbg.h> #include <scsi/scsi_host.h> #include "aha152x.h" @@ -986,7 +987,7 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p if (HOSTDATA(shpnt)->debug & debug_queue) { printk(INFO_LEAD "queue: %p; cmd_len=%d pieces=%d size=%u cmnd=", CMDINFO(SCpnt), SCpnt, SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen); - print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->cmnd); } #endif @@ -1560,7 +1561,7 @@ static void busfree_run(struct Scsi_Host *shpnt) #if 0 if(HOSTDATA(shpnt)->debug & debug_eh) { printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC)); - print_sense("bh", DONE_SC); + scsi_print_sense("bh", DONE_SC); } #endif @@ -1846,7 +1847,7 @@ static void msgi_run(struct Scsi_Host *shpnt) #if defined(AHA152X_DEBUG) if (HOSTDATA(shpnt)->debug & debug_msgi) { printk(INFO_LEAD "inbound message %02x ", CMDINFO(CURRENT_SC), MSGI(0)); - print_msg(&MSGI(0)); + scsi_print_msg(&MSGI(0)); printk("\n"); } #endif @@ -1934,7 +1935,7 @@ static void msgi_run(struct Scsi_Host *shpnt) break; printk(INFO_LEAD, CMDINFO(CURRENT_SC)); - print_msg(&MSGI(0)); + scsi_print_msg(&MSGI(0)); printk("\n"); ticks = (MSGI(3) * 4 + 49) / 50; @@ -2032,7 +2033,7 @@ static void msgo_init(struct Scsi_Host *shpnt) int i; printk(DEBUG_LEAD "messages( ", CMDINFO(CURRENT_SC)); - for (i=0; i<MSGOLEN; i+=print_msg(&MSGO(i)), printk(" ")) + for (i=0; i<MSGOLEN; i+=scsi_print_msg(&MSGO(i)), printk(" ")) ; printk(")\n"); } @@ -2104,7 +2105,7 @@ static void cmd_init(struct Scsi_Host *shpnt) #if defined(AHA152X_DEBUG) if (HOSTDATA(shpnt)->debug & debug_cmd) { printk(DEBUG_LEAD "cmd_init: ", CMDINFO(CURRENT_SC)); - print_command(CURRENT_SC->cmnd); + __scsi_print_command(CURRENT_SC->cmnd); } #endif @@ -2158,7 +2159,7 @@ static void status_run(struct Scsi_Host *shpnt) #if defined(AHA152X_DEBUG) if (HOSTDATA(shpnt)->debug & debug_status) { printk(DEBUG_LEAD "inbound status %02x ", CMDINFO(CURRENT_SC), CURRENT_SC->SCp.Status); - print_status(CURRENT_SC->SCp.Status); + scsi_print_status(CURRENT_SC->SCp.Status); printk("\n"); } #endif @@ -2925,7 +2926,7 @@ static void show_command(Scsi_Cmnd *ptr) printk(KERN_DEBUG "0x%08x: target=%d; lun=%d; cmnd=(", (unsigned int) ptr, ptr->device->id, ptr->device->lun); - print_command(ptr->cmnd); + __scsi_print_command(ptr->cmnd); printk(KERN_DEBUG "); request_bufflen=%d; resid=%d; phase |", ptr->request_bufflen, ptr->resid); diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 24dd0b890dd2..be2caecbbdd9 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -150,6 +150,7 @@ #include <asm/ecard.h> #include "../scsi.h" +#include <scsi/scsi_dbg.h> #include <scsi/scsi_host.h> #include "acornscsi.h" #include "msgqueue.h" @@ -866,7 +867,7 @@ void acornscsi_done(AS_Host *host, Scsi_Cmnd **SCpntp, unsigned int result) default: printk(KERN_ERR "scsi%d.H: incomplete data transfer detected: result=%08X command=", host->host->host_no, SCpnt->result); - print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->cmnd); acornscsi_dumpdma(host, "done"); acornscsi_dumplog(host, SCpnt->device->id); SCpnt->result &= 0xffff; @@ -1369,7 +1370,7 @@ void acornscsi_sendmessage(AS_Host *host) host->scsi.last_message = msg->msg[0]; #if (DEBUG & DEBUG_MESSAGES) - print_msg(msg->msg); + scsi_print_msg(msg->msg); #endif break; @@ -1391,7 +1392,7 @@ void acornscsi_sendmessage(AS_Host *host) while ((msg = msgqueue_getmsg(&host->scsi.msgs, msgnr++)) != NULL) { unsigned int i; #if (DEBUG & DEBUG_MESSAGES) - print_msg(msg); + scsi_print_msg(msg); #endif i = 0; if (acornscsi_write_pio(host, msg->msg, &i, msg->length, 1000000)) @@ -1487,7 +1488,7 @@ void acornscsi_message(AS_Host *host) #if (DEBUG & DEBUG_MESSAGES) printk("scsi%d.%c: message in: ", host->host->host_no, acornscsi_target(host)); - print_msg(message); + scsi_print_msg(message); printk("\n"); #endif diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 5411e850c833..0a172c1e9f7e 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c @@ -52,6 +52,7 @@ #include <asm/ecard.h> #include "../scsi.h" +#include <scsi/scsi_dbg.h> #include <scsi/scsi_host.h> #include "fas216.h" #include "scsi.h" @@ -309,7 +310,7 @@ fas216_log_command(FAS216_Info *info, int level, Scsi_Cmnd *SCpnt, char *fmt, .. va_end(args); printk(" CDB: "); - print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->cmnd); } static void @@ -2081,7 +2082,7 @@ fas216_std_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result) info->host->host_no, '0' + SCpnt->device->id, SCpnt->result, info->scsi.SCp.ptr, info->scsi.SCp.this_residual); - print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->cmnd); SCpnt->result &= ~(255 << 16); SCpnt->result |= DID_BAD_TARGET << 16; goto request_sense; @@ -2170,7 +2171,7 @@ static void fas216_done(FAS216_Info *info, unsigned int result) info->host->host_no, '0' + SCpnt->device->id, info->scsi.SCp.ptr, info->scsi.SCp.this_residual); info->scsi.SCp.ptr = NULL; - print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->cmnd); } /* @@ -2426,7 +2427,7 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt) info->stats.aborts += 1; printk(KERN_WARNING "scsi%d: abort command ", info->host->host_no); - print_command(SCpnt->data_cmnd); |