summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2001-12-14Major restructuring for swizzling to the request queue and unswizzling frommjacob
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have a complete set of inline functions in isp_inline.h. Each platform is responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32} macros. The reason this needs to be done is that we need to have a single set of functions that will work correctly on multiple architectures for both little and big endian machines. It also needs to work correctly in the case that we have the request or response queues in memory that has to be treated specially (e.g., have ddi_dma_sync called on it for Solaris after we update it or before we read from it). One thing that falls out of this is that we no longer build requests in the request queue itself. Instead, we build the request locally (e.g., on the stack) and then as part of the swizzling operation, copy it to the request queue entry we've allocated. I thought long and hard about whether this was too expensive a change to make as it in a lot of cases requires an extra copy. On balance, the flexbility is worth it. With any luck, the entry that we build locally stays in a processor writeback cache (after all, it's only 64 bytes) so that the cost of actually flushing it to the memory area that is the shared queue with the PCI device is not all that expensive. We may examine this again and try to get clever in the future to try and avoid copies. Another change that falls out of this is that MEMORYBARRIER should be taken a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the entry being added. But there had been many other places this had been missing. It's now very important that it be done. For OpenSD, it does a ddi_dmamap_sync as appropriate. This gets us out of the explicit ddi_dmamap_sync on the whole response queue that we did for SBus cards at each interrupt. Now, because SBus/sparc doesn't use bus_dma, some shenanigans were done to support this. But Jason was nice enough to test the SBus/sparcv9 changes for me, and they did the right thing as well. Set things up so that platforms that cannot have an SBus don't get a lot of the SBus code checks (dead coded out). Additional changes: Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry, the iptr value that gets returned is the value we intend to eventually plug into the ISP registers as the entry *one past* the last one we've written- *not* the current entry we're updating. All along we've been calling sync functions on the wrong index value. Argh. The 'fix' here is to rename all 'iptr' variables as 'nxti' to remember that this is the 'next' pointer- not the current pointer. Devote a single bit to mboxbsy- and set aside bits for output mbox registers that we need to pick up- we can have at least one command which does not have any defined output registers (MBOX_EXECUTE_FIRMWARE). Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response. Otherwise, we won't unswizzle it correctly. Nuke some additional __P macros.
2001-12-14$OpenBSD$Dale Rahn
2001-12-14Hmm, too bad the interrupts do not configure. need pci_intr_fixup().Dale Rahn
'commit that' jason@
2001-12-14Major restructuring for swizzling to the request queue and unswizzling frommjacob
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have a complete set of inline functions in isp_inline.h. Each platform is responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32} macros. The reason this needs to be done is that we need to have a single set of functions that will work correctly on multiple architectures for both little and big endian machines. It also needs to work correctly in the case that we have the request or response queues in memory that has to be treated specially (e.g., have ddi_dma_sync called on it for Solaris after we update it or before we read from it). One thing that falls out of this is that we no longer build requests in the request queue itself. Instead, we build the request locally (e.g., on the stack) and then as part of the swizzling operation, copy it to the request queue entry we've allocated. I thought long and hard about whether this was too expensive a change to make as it in a lot of cases requires an extra copy. On balance, the flexbility is worth it. With any luck, the entry that we build locally stays in a processor writeback cache (after all, it's only 64 bytes) so that the cost of actually flushing it to the memory area that is the shared queue with the PCI device is not all that expensive. We may examine this again and try to get clever in the future to try and avoid copies. Another change that falls out of this is that MEMORYBARRIER should be taken a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the entry being added. But there had been many other places this had been missing. It's now very important that it be done. For OpenSD, it does a ddi_dmamap_sync as appropriate. This gets us out of the explicit ddi_dmamap_sync on the whole response queue that we did for SBus cards at each interrupt. Now, because SBus/sparc doesn't use bus_dma, some shenanigans were done to support this. But Jason was nice enough to test the SBus/sparcv9 changes for me, and they did the right thing as well. Set things up so that platforms that cannot have an SBus don't get a lot of the SBus code checks (dead coded out). Additional changes: Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry, the iptr value that gets returned is the value we intend to eventually plug into the ISP registers as the entry *one past* the last one we've written- *not* the current entry we're updating. All along we've been calling sync functions on the wrong index value. Argh. The 'fix' here is to rename all 'iptr' variables as 'nxti' to remember that this is the 'next' pointer- not the current pointer. Devote a single bit to mboxbsy- and set aside bits for output mbox registers that we need to pick up- we can have at least one command which does not have any defined output registers (MBOX_EXECUTE_FIRMWARE). Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response. Otherwise, we won't unswizzle it correctly. Nuke some additional __P macros.
2001-12-14Roll f/w to latest && greatest for 2100 and 2200 cards.mjacob
2001-12-13If initialization fails, panic right away, instead ofNiklas Hallqvist
crashing randomly a little later.
2001-12-13Fix old alpha bug recently triggered by conversion to busdma.Nathan Binkert
2001-12-13changes to work with 32bit platforms and get ethernet address on powerpc.Dale Rahn
Inspired by NetBSD.
2001-12-13Initialize variable before use. ok fgs@Thomas Nordin
2001-12-12disable debugging, pointed out by brad@Michael Shalayeff
2001-12-12usmoke some scsi drugs, a little bitMichael Shalayeff
2001-12-11syncTodd T. Fries
2001-12-11Intel pchb and agp, nvidia gf2mx100Todd T. Fries
2001-12-11Support Promise Ultra100TX2 (PDC20268)Chris Cappuccio
from Alexander Yurchenko <grange@rt.mipt.ru>
2001-12-08Fix compilation error when building a raid enabled kernel.Thierry Deval
OK deraadt@
2001-12-08Do not compile the pnp attachments unless they're requested; deraadt@ okFederico G. Schwindt
2001-12-08Go ahead and fix the xircom filter setup to work on big endian too ↵Jason Wright
(untested, but it's pretty similiar to the tested 21143 case).
2001-12-08use htole32() on the data going into the setup frame for the ↵Jason Wright
dc_setfilt_21143() case at least. XXX I'm looking at the other filter setups and they appear to need work for BE too.
2001-12-08Sprinkle pmap_update calls where relevant and some otherArtur Grabowski
misc pmap usage fixes.
2001-12-07Don't disable TRDY/RETRY, this doesn't have the expected behavior.Jason Wright
2001-12-07bitmask_snprintf goes awayTheo de Raadt
2001-12-07Make vnds larger than 2G work, mostly by Daniel Lucq <daniel@lucq.org>Niklas Hallqvist
toouches by me.
2001-12-06add bus_dmamap_sync()'s on the descriptors tooJason Wright
(with all this, my Netra X1 is up and running with an NFS root)
2001-12-06a few more bus_dmamap_sync()'s and some borrowed setup frame macros from ↵Jason Wright
NetBSD, and RX works on sparc64.
2001-12-06enough bus_dmamap_sync() and htole()/letoh() to get TX working on sparc64.Jason Wright
ALso, get the MAC address from myetheraddr() instead of trying to use the eeprom on sparc64.
2001-12-06vtophys, R.I.P. (tx now uses bus_dma)Jason Wright
2001-12-06move rx handling over to bus_dma... that just leaves one vtophys() in tx.Jason Wright
2001-12-06update the radio chipset supportMichael Shalayeff
2001-12-06clear all inrterrupts separately and before enabling any.Michael Shalayeff
this prevents stray interrupts and sometimes hangs, caused by looping on stray unmapped interrupt.
2001-12-06move the setup buffer and pad into a bus_dma alloced areaJason Wright
(current score: 2 vtophys calls to go...)
2001-12-06Checkpoint bus_dma work in progress:Jason Wright
- descriptor lists are now bus_dma allocated and manipulated (for those keeping score: 6 vtophys dead, 4 to go)
2001-12-05match on Symbol's Spectrum24 pcmcia/prism2, form netbsdMichael Shalayeff
2001-12-05add simpletech spectrum24, from netbsdMichael Shalayeff
2001-12-05syncChristian Weisgerber
2001-12-05Add AdLib MSC 16 PnP.Christian Weisgerber
From Georg Schwarz <georg.schwarz@iname.com>; ok deraadt@
2001-12-05kill ugly spacesMichael Shalayeff
2001-12-05unsmoke radiumMichael Shalayeff
2001-12-05add radiotack defsMichael Shalayeff
2001-12-05update for radio drivers from tm@oganer.net und jumbo@narod.ruMichael Shalayeff
2001-12-05choose one AC97 name and stick with it a bit more oftenTheo de Raadt
2001-12-05Same stuff as cgthree:Jason Wright
- fix initialization so that the cursor is initialized to be in the same place the prom left it. - remove some trial and error #if 0 stuff - fix copyo's in a2int() - ditch *_romcursoraddr for a direct call to romgetcursoraddr() - allow this to attach (without panic()) if it is not the console.
2001-12-05- fix initialization so that the cursor is initialized to be in the sameJason Wright
place the prom left it. - remove some trial and error #if 0 stuff - fix copyo's in a2int() - ditch *_romcursoraddr for a direct call to romgetcursoraddr() - allow this to attach (without panic()) if is is not the console.
2001-12-04skeleton driver for cgthree (at the same point as cgsix)Jason Wright
2001-12-04wscons driver for cgsix (based on vgafb from macppc and cgsix from sparc)Jason Wright
Still kinda ugly, but seems to work.
2001-12-04regenMichael Shalayeff
2001-12-04compaq smart array 5* series, from freebsd's ciss(4)Michael Shalayeff
2001-12-02bzero the waa and not ready yet for the consoleMichael Shalayeff
2001-12-01correct irq messageTheo de Raadt
2001-12-01syncTheo de Raadt
2001-12-01change to WSEMUL_NO_DUMBTheo de Raadt