summaryrefslogtreecommitdiff
path: root/sys/dev/pci/arc.c
AgeCommit message (Collapse)Author
2006-11-04query the firmware for the number of volumes, and then iterate through themDavid Gwynne
to get the right names for sensor creation.
2006-11-01dont walk the device list looking for our scsibus, it is stashed when weDavid Gwynne
attach it.
2006-11-01whitespace fixesDavid Gwynne
2006-10-31first cut at sensorsJolan Luff
help from & ok dlg@
2006-09-25well, this is embarrassing.David Gwynne
it turns out a drivers detach code isnt called when the machine is shutting down, which meant my bits to stop bgrb and sync the cache werent being run. without those bits being run the filesystems on these controllers were never clean on reboot, so we'd always get an fsck. so now we provide a shutdown hook which does get run on shutdown to sync the cache properly. found by claudio@
2006-09-25enabling interrupts isnt a bug, so dont put XXX next to it.David Gwynne
only ack the interrupts we deal with in the interrupt handler. use the correct macros when setting the interrupt mask.
2006-08-28move the firmware messaging under NBIO since it's only used by bio.David Gwynne
2006-08-28turns out the volume info contains a bitmap of failed physdisks in it, soDavid Gwynne
i can just check if this is non zero to see if a volume is degraded. this means i dont have to pull the raid info page to find failed disks in the volume inquiry.
2006-08-27sigh, this is annoying. it appears that the arc firmware doesnt care if aDavid Gwynne
volume is degraded, just if it is working or not. if a volume is degraded, its still online, so we have to go look for missing disks. if a disk has been replaced, but it is yet to be rebuilt, the firmware kindly tells us that it needs rebuilding. we can figure out if a volume is degraded using these two facts.
2006-08-27try to get the status of the volume out of the arc firmware and intoDavid Gwynne
bioctl output. this is actually a bit of a struggle since the firmware doesnt represent these states well at all. im only showing the obvious ones: online, init, rebuild, and offline. i have no idea how they tell if a volume is degraded.
2006-08-27if a disk dissapears out of a raidset, then the raid info will list its idDavid Gwynne
as 0xff, and the command to query that phys disk will fail and cause the ioctl to get stuck. so if the disk id is 0xff, fake an offline disk on another bus since bioctl doesnt know how to show that properly.
2006-08-27little nitDavid Gwynne
2006-08-25fill in the controllers name in the inq ioctl. spotted by deraadt@David Gwynne
2006-08-24show the firmware revision of the disks.David Gwynne
2006-08-24report the size of the disks and volumes correctly.David Gwynne
2006-08-24too much copy and paste. report raid 1 correctly.David Gwynne
2006-08-24ignore passthru volumes, struct bioc_vol isnt smart enough to know whatDavid Gwynne
they are.
2006-08-24figure out the raid level of the volume.David Gwynne
2006-08-24oops, im unlocking too oftenDavid Gwynne
2006-08-24a start at the BIOC INQ, VOL, and DISK ioctls for fetching informationDavid Gwynne
about the disks that are configured on the controller. so far this fetches the right volumes and disks in each volume, but doesnt properly fill in the status, the size of both the volumes and disks, the type of raid, or the firmware version of the physical disks.
2006-08-20stash a pointer to the scsibus attached to us. we can use this later toDavid Gwynne
find the names of our volumes.
2006-08-20definitions of the messages for raid, volume, and physical disksDavid Gwynne
2006-08-20get rid of the horror that was the ARC_FW_MSG macroDavid Gwynne
2006-08-20get rid of the old arc_msgbuf.David Gwynne
2006-08-20cut the rest of the bioctl alarm stuff over to the new arc_msgbufDavid Gwynne
2006-08-20because the header on firmware commands causes the rest of the message toDavid Gwynne
be unaligned we basically need to bounce the contents of the message in and out of what is submitted to the hardware. rather than have the callers of arc_msgbuf do that, make arc_msgbuf do it for them. while we're here, make arc_msgbuf do the checksumming and length checks so the callers dont have to do that either. this adds an alternative to arc_msgbuf that does the new functionality and cuts arc_bio_alarm_state over to using it. i'll cut the other users of arc_msgbuf over shortly and remove the old implementation.
2006-08-18oops, debug cruft shouldnt go into the tree.David Gwynne
2006-08-18add the sysinfo struct, and then use it to get the current state of theDavid Gwynne
alarm.
2006-08-18easy bio bits first. this is is code that should enable, disable, andDavid Gwynne
silence the alarm. the hardware can also report the state of the alarm, but its embedded in a really large message im not 100% sure about yet.
2006-08-18arc, meet bio. bio, meet arc.David Gwynne
2006-08-18fix up the arc fw message macros a bit. change a comment while here.David Gwynne
2006-08-18a bit more infrastructure for firmware commands.David Gwynne
2006-08-17dont need debug in the treeDavid Gwynne
2006-08-17man, i wish firmware commands were as easy as scsi io's on theseDavid Gwynne
controllers. this is horrible code that is set up to allow a process, (eg and ioctl or the sensor thread) to issue a command and get a response.
2006-08-15when there's normal sense data i think the command completed ok, there'sDavid Gwynne
just extra data. say there's no residual if that's the case.
2006-08-15try to deal appropriate with errors from the io command replyDavid Gwynne
2006-08-14start and stop bgrb during attach and detach respectively. as a bonusDavid Gwynne
flush the hbas cache on detach as well. writes on my raid5 seem to run fast now.
2006-08-14firmware commands (as opposed to io commands) are sent to the firmware viaDavid Gwynne
the IOC_WBUF area in bus_space, and replies to it are read from the IOC_RBUF area. the freebsd and linux drivers define these areas to be 32 dwords in length, but it then goes and casts these spaces to a struct that has a 4 byte word at the start with the length of the message in it, followed by a 124 byte buffer which is filled with the actual message in it. rather than screwing around with an extra struct and casts, we can define this header as a register of its own, and the buffer as a separate region in bus_space. this simplifies command submission and the retrieval of the replies (which is yet to be written properly).
2006-08-09define the size of regions in the register space in terms of bytes, notDavid Gwynne
dwords
2006-08-07whitespace fixesDavid Gwynne
2006-08-07from the drivers side of the iop331 there is only one set of interruptDavid Gwynne
registers to deal with, the other set are used on the firmware side of the device. shrink a bit by removing the definitions of the firmwares registers.
2006-08-06endian fixes. this works on sparc64 now.David Gwynne
2006-08-06fill out the interrupt handler. io is now no longer polled, and as a bonusDavid Gwynne
it's fairly fast :)
2006-08-06we can support more than one entry in an sgl, so stop lying to bus_dmaDavid Gwynne
2006-08-06less magicDavid Gwynne
2006-08-06io commands are the only ones every posted on the queues, so hardcode theDavid Gwynne
type into the ccb rather than use void *s and insane casting to get at bits of the command.
2006-08-05implement reply and post queue handling, but only polled for now. io shouldDavid Gwynne
work with this, but i cant test without disks.
2006-08-03white space fixesDavid Gwynne
2006-07-31take a scsi xfer from the midlayer and turn it into an areca io command.David Gwynne
its inside an if 0 chunk till i write the post and reply queue handling and the response handling.
2006-07-31hook arc up to the scsi midlayerDavid Gwynne