aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_proc.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-06-17 18:42:23 -0500
committerJames Bottomley <jejb@titanic.(none)>2005-06-17 18:42:23 -0500
commit3237ee78fc00f786d5f5aec6f9310b0e39069f15 (patch)
tree4c94e70ab846ffcb8bb5715fb3c8d8473358a323 /drivers/scsi/aic7xxx/aic7xxx_proc.c
parent9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff)
parentdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (diff)
downloadkernel_samsung_aries-3237ee78fc00f786d5f5aec6f9310b0e39069f15.zip
kernel_samsung_aries-3237ee78fc00f786d5f5aec6f9310b0e39069f15.tar.gz
kernel_samsung_aries-3237ee78fc00f786d5f5aec6f9310b0e39069f15.tar.bz2
merge by hand (fix up qla_os.c merge error)
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_proc.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c
index 5fece85..ab4469d 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -50,7 +50,7 @@ static void ahc_dump_target_state(struct ahc_softc *ahc,
u_int our_id, char channel,
u_int target_id, u_int target_offset);
static void ahc_dump_device_state(struct info_str *info,
- struct ahc_linux_device *dev);
+ struct scsi_device *dev);
static int ahc_proc_write_seeprom(struct ahc_softc *ahc,
char *buffer, int length);
@@ -142,6 +142,7 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
u_int target_offset)
{
struct ahc_linux_target *targ;
+ struct scsi_target *starget;
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
int lun;
@@ -153,7 +154,8 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
copy_info(info, "Target %d Negotiation Settings\n", target_id);
copy_info(info, "\tUser: ");
ahc_format_transinfo(info, &tinfo->user);
- targ = ahc->platform_data->targets[target_offset];
+ starget = ahc->platform_data->starget[target_offset];
+ targ = scsi_transport_target_data(starget);
if (targ == NULL)
return;
@@ -163,22 +165,25 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
ahc_format_transinfo(info, &tinfo->curr);
for (lun = 0; lun < AHC_NUM_LUNS; lun++) {
- struct ahc_linux_device *dev;
+ struct scsi_device *sdev;
- dev = targ->devices[lun];
+ sdev = targ->sdev[lun];
- if (dev == NULL)
+ if (sdev == NULL)
continue;
- ahc_dump_device_state(info, dev);
+ ahc_dump_device_state(info, sdev);
}
}
static void
-ahc_dump_device_state(struct info_str *info, struct ahc_linux_device *dev)
+ahc_dump_device_state(struct info_str *info, struct scsi_device *sdev)
{
+ struct ahc_linux_device *dev = scsi_transport_device_data(sdev);
+
copy_info(info, "\tChannel %c Target %d Lun %d Settings\n",
- dev->target->channel + 'A', dev->target->target, dev->lun);
+ sdev->sdev_target->channel + 'A',
+ sdev->sdev_target->id, sdev->lun);
copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued);
copy_info(info, "\t\tCommands Active %d\n", dev->active);
@@ -292,20 +297,13 @@ int
ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
off_t offset, int length, int inout)
{
- struct ahc_softc *ahc;
+ struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
struct info_str info;
char ahc_info[256];
- u_long s;
u_int max_targ;
u_int i;
int retval;
- retval = -EINVAL;
- ahc_list_lock(&s);
- ahc = ahc_find_softc(*(struct ahc_softc **)shost->hostdata);
- if (ahc == NULL)
- goto done;
-
/* Has data been written to the file? */
if (inout == TRUE) {
retval = ahc_proc_write_seeprom(ahc, buffer, length);
@@ -367,6 +365,5 @@ ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
}
retval = info.pos > info.offset ? info.pos - info.offset : 0;
done:
- ahc_list_unlock(&s);
return (retval);
}