Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/scsipi



On Thu, Nov 30, 2006 at 08:46:10PM -0600, khym%azeotrope.org@localhost wrote:
> On Thu, Nov 30, 2006 at 04:23:21PM +0000, Christos Zoulas wrote:
> > 
> > Module Name:        src
> > Committed By:       christos
> > Date:               Thu Nov 30 16:23:21 UTC 2006
> > 
> > Modified Files:
> >     src/sys/dev/scsipi: scsipi_all.h scsipi_cd.h scsipi_disk.h
> > 
> > Log Message:
> > PR/34202: Dave Huang: Accessing cd device on alpha causes kernel trap
> > 
> > From the PR:
> >   Since struct scsipi_read_discinfo_data is an odd number of bytes long
> >   (35 bytes), ti ends up being unaligned. wdc_datain_pio() uses
> >   bus_space_read_multi_4() to read the response from the drive, and
> >   since ti is unaligned, it causes an unaligned access fault.
> > 
> > Add __aligned__(4) to all the structures.
> 
> Uh oh... I wonder if maybe putting it on all the structures wasn't such
> a good idea after all... while the ATA/ATAPI devices seem OK, SCSI seems
> broken now:
> 
> esiop0 at pci0 dev 6 function 0: Symbios Logic 53c875 (ultra-wide scsi)
> esiop0: using on-board RAM
> esiop0: interrupting at eb164 irq 0
> scsibus0 at esiop0: 16 targets, 8 luns per target
> [ ... ]
> scsibus0: waiting 2 seconds for devices to settle...
> esiop0: unexpected phase mismatch 1
> esiop0: unhandled scsi interrupt, sist=0xc0 sstat1=0x9 DSA=0x401ce000 
> DSP=0x580

I've not looked closely at the commit but I suspect some structs here are
really used unaligned, packed with some other, or a single int8.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index