Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1313
b: refs/heads/master
c: fb3089d
h: refs/heads/master
i:
  1311: d22642a
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed May 20, 2005
1 parent 9ee01fe commit 6b5138c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7525233d2df39b95552f6f49c6b390a9c4d2e80
refs/heads/master: fb3089dfb58bf07992252b42e77c6f35d45dff5e
15 changes: 11 additions & 4 deletions trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ ahc_linux_slave_alloc(struct scsi_device *device)
struct ahc_linux_target *targ;
struct scsi_target *starget = device->sdev_target;
struct ahc_linux_device *dev;
u_int target_offset;
unsigned int target_offset;
unsigned long flags;
int retval = -ENOMEM;

target_offset = starget->id;
if (starget->channel != 0)
Expand All @@ -654,12 +656,14 @@ ahc_linux_slave_alloc(struct scsi_device *device)
ahc = *((struct ahc_softc **)device->host->hostdata);
if (bootverbose)
printf("%s: Slave Alloc %d\n", ahc_name(ahc), device->id);
ahc_lock(ahc, &flags);
targ = ahc->platform_data->targets[target_offset];
if (targ == NULL) {
targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id);
struct seeprom_config *sc = ahc->seep_config;
if (targ == NULL)
return -ENOMEM;
goto out;

if (sc) {
unsigned short scsirate;
struct ahc_devinfo devinfo;
Expand Down Expand Up @@ -701,10 +705,13 @@ ahc_linux_slave_alloc(struct scsi_device *device)
if (dev == NULL) {
dev = ahc_linux_alloc_device(ahc, targ, device->lun);
if (dev == NULL)
return -ENOMEM;
goto out;
}
retval = 0;

return 0;
out:
ahc_unlock(ahc, &flags);
return retval;
}

static int
Expand Down

0 comments on commit 6b5138c

Please sign in to comment.