summaryrefslogtreecommitdiff
path: root/sys/dev/pci/arc.c
AgeCommit message (Collapse)Author
2007-11-05wait for the marvell firmware to become ok.David Gwynne
2007-11-04start providing function pointers to differentiate between the intel andDavid Gwynne
marvell boards.
2007-11-04very initial foundation for splitting things up to support both theDavid Gwynne
traditional intel iop and the new marvell one used on the ARC-1200 rev B.
2007-11-04the 1200 and 1202 shoudl work fine too.David Gwynne
2007-10-30shrink the intr establish code a bit. all that intrstr handling is cruft.David Gwynne
2007-10-30the marvell based boards have difference registers to the current intel iopDavid Gwynne
based ones. this renames the register defines for the revision A boards (the intel ones) to ARC_RA instead of ARC_REG so we can differentiate them from the ARC_RB registers for revision B that are coming.
2007-10-30if we cant query the firmware or allocate ccbs then clean up the pciDavid Gwynne
mappings. without this a problem board can cause a panic when the interrupt handler touches unallocated memory.
2007-10-27the arc fimware can be configured with a password that is used toDavid Gwynne
restrict changes to its configuration. in our case we want to be able to disable or enable the alarm. if a password is set though, the firmware will reject that request with a PASSWORD_REQUIRED response code. this change lets the kernel return EPERM instead of EIO in that case. if you dont have a password set on the firmware you can configure the alarm just fine. makes sense claudio@
2007-10-22arc supports more than just SATA hbas, so dont say the ports are alwaysDavid Gwynne
SATA ports. print "firmware" instead of "FW Version:" cos i think it looks better. tested on a 1680 which seems to just work so far.
2007-10-01More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' whereKenneth R Westerback
obvious.
2007-07-11Use the full 64 bits available when reporting sizes; now bioctl showsOtto Moerbeek
the correct size for my 4.TB volume. Original diff from dlg@ with some tweaks by me; ok dlg@
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
2007-05-29sprinkle some SMALL_KERNEL to permit bio/softraid to run on boot mediaTodd T. Fries
ok marco@ then suggested deraadt@
2007-05-20Add missing arguments to printf.Ray Lai
OK tedu@, dlg@.
2007-03-27more grammar fixups; from bret lambert and myselfJason McIntyre
2007-03-27grammar from bret lambert, and one more from me;Jason McIntyre
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2007-02-20No use checking malloc return when called with M_WAITOK.Thordur I. Bjornsson
ok dlg@, tested by jolan@
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-12-22always include sensors.hTheo de Raadt
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
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.