Commit 73a25462 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley

[SCSI] aic79xx: update to use scsi_transport_spi

This patch updates the aic79xx driver to take advantage of the
scsi_transport_spi infrastructure. Patch is quite a mess as some
procedures have been reshuffled to be closer to the aic7xxx driver.

Rejections fixed and
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 60a13213
This diff is collapsed.
This diff is collapsed.
...@@ -49,7 +49,7 @@ static void ahd_dump_target_state(struct ahd_softc *ahd, ...@@ -49,7 +49,7 @@ static void ahd_dump_target_state(struct ahd_softc *ahd,
u_int our_id, char channel, u_int our_id, char channel,
u_int target_id, u_int target_offset); u_int target_id, u_int target_offset);
static void ahd_dump_device_state(struct info_str *info, static void ahd_dump_device_state(struct info_str *info,
struct ahd_linux_device *dev); struct scsi_device *sdev);
static int ahd_proc_write_seeprom(struct ahd_softc *ahd, static int ahd_proc_write_seeprom(struct ahd_softc *ahd,
char *buffer, int length); char *buffer, int length);
...@@ -167,6 +167,7 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, ...@@ -167,6 +167,7 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
u_int target_offset) u_int target_offset)
{ {
struct ahd_linux_target *targ; struct ahd_linux_target *targ;
struct scsi_target *starget;
struct ahd_initiator_tinfo *tinfo; struct ahd_initiator_tinfo *tinfo;
struct ahd_tmode_tstate *tstate; struct ahd_tmode_tstate *tstate;
int lun; int lun;
...@@ -176,7 +177,8 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, ...@@ -176,7 +177,8 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
copy_info(info, "Target %d Negotiation Settings\n", target_id); copy_info(info, "Target %d Negotiation Settings\n", target_id);
copy_info(info, "\tUser: "); copy_info(info, "\tUser: ");
ahd_format_transinfo(info, &tinfo->user); ahd_format_transinfo(info, &tinfo->user);
targ = ahd->platform_data->targets[target_offset]; starget = ahd->platform_data->starget[target_offset];
targ = scsi_transport_target_data(starget);
if (targ == NULL) if (targ == NULL)
return; return;
...@@ -184,12 +186,11 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, ...@@ -184,12 +186,11 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
ahd_format_transinfo(info, &tinfo->goal); ahd_format_transinfo(info, &tinfo->goal);
copy_info(info, "\tCurr: "); copy_info(info, "\tCurr: ");
ahd_format_transinfo(info, &tinfo->curr); ahd_format_transinfo(info, &tinfo->curr);
copy_info(info, "\tTransmission Errors %ld\n", targ->errors_detected);
for (lun = 0; lun < AHD_NUM_LUNS; lun++) { for (lun = 0; lun < AHD_NUM_LUNS; lun++) {
struct ahd_linux_device *dev; struct scsi_device *dev;
dev = targ->devices[lun]; dev = targ->sdev[lun];
if (dev == NULL) if (dev == NULL)
continue; continue;
...@@ -199,10 +200,13 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, ...@@ -199,10 +200,13 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
} }
static void static void
ahd_dump_device_state(struct info_str *info, struct ahd_linux_device *dev) ahd_dump_device_state(struct info_str *info, struct scsi_device *sdev)
{ {
struct ahd_linux_device *dev = scsi_transport_device_data(sdev);
copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", 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 Queued %ld\n", dev->commands_issued);
copy_info(info, "\t\tCommands Active %d\n", dev->active); copy_info(info, "\t\tCommands Active %d\n", dev->active);
......
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