Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/wd33c93.c
RevisionDateAuthorComments
 1.33  09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.32  09-Feb-2022  andvar fix various typos in comments.
 1.31  21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.30  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.29  24-Apr-2021  thorpej branches: 1.29.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.28  10-Feb-2019  christos branches: 1.28.14;
Introduce PR_ZERO to avoid open-coding memset()s everywhere. OK riastradh@.
 1.27  08-Feb-2018  dholland branches: 1.27.4;
Typos.
 1.26  11-Jan-2017  skrll adatper -> adapter
 1.25  22-Jan-2014  christos branches: 1.25.6; 1.25.10;
fix unused variable warnings
 1.24  13-Nov-2010  uebayasi branches: 1.24.8; 1.24.18; 1.24.22;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.23  12-Feb-2009  rumble branches: 1.23.4;
If sc_dmamode is set to SBIC_CTL_NO_DMA, then actually don't do DMA. Now
PIO mode actually works.
 1.22  27-Jan-2009  tsutsui branches: 1.22.2;
- use device_t and cfdata_t
- rename variables for readability after device_t/softc split
- use proper pointer types

No binary changes.
 1.21  25-Jan-2009  bjh21 Split device_t from wd33c93_softc. Reviewed by cube; tested on sgimips
by tsutsui.
 1.20  20-Jan-2009  bjh21 Convert more printfs to aprint_* and use the latter more consistently.
 1.19  08-Apr-2008  cegger branches: 1.19.4; 1.19.12;
use aprint_*_dev and device_xname
 1.18  19-Oct-2007  ad branches: 1.18.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.17  09-Jul-2007  ad branches: 1.17.6; 1.17.8; 1.17.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.16  21-May-2007  rumble Fix comments about the cf_flags layout and use macros to test whether
tags, sync, and disconnect/reconnect are to be disabled or not.
 1.15  21-May-2007  rumble Check in a workaround before I lose or forget about it:

My SGI issued IBM DORS-32160 will respond to every message with a sync
negotiation (even IDENTIFY) until it gets a response it likes (and it
definitely doesn't like async). Unfortunately, this locks us into an endless
loop after sending IDENTIFY, since the device responds with a SYNC
negotiation that we refuse to accept. This refusal results in a new
target-initiated sync negotiation, and so on...

To work around this, permit negotiating sync mode on an unexpected
target-initiated sync negotiation.
 1.14  08-May-2007  rumble Report whether we're using DMA and what type on attach, since I keep losing
track while testing.
 1.13  08-May-2007  rumble The maximum FIFO depth on old WD33C93 parts is only 5, not 12 as on 93A and
93B. However, there appear to be issues using the maximum of 5 on old
parts, so 4 is it.
 1.12  08-May-2007  rumble Enable Fast SCSI transfers for WD33C93B parts with appropriate input
clocks.

My Seagate ST32430N now sees about 50% greater throughput (about 97% as
fast as IRIX can push it). However, there appear to be other performance
issues with the driver as other disks perform significantly worse than they
should, with or without this change.

Reviewed by bjh21. Tested on my Indy and Challenge S.
 1.11  12-Mar-2007  ad branches: 1.11.2;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.10  05-Mar-2007  he branches: 1.10.2;
Cast to char* before doing pointer arithmetic.
 1.9  01-Oct-2006  bjh21 branches: 1.9.4; 1.9.6;
Allow wd33c93 attachments to choose what DMA mode it should use, and arrange
to use burst mode on sec(4), which makes it slightly but significantly faster.
 1.8  26-Sep-2006  bjh21 Merge my bjh21-wd33c93 branch. This improves message handling in general
and sync negotiation in particular. Tested on sgimips (thanks to
Manuel Bouyer) and acorn26 (with my still-unfinished driver for the Acorn
SCSI Expansion Card).
 1.7  05-Sep-2006  rumble branches: 1.7.2; 1.7.4; 1.7.6;
Make this work with timecounters.
 1.6  27-Aug-2006  bjh21 branches: 1.6.2; 1.6.4;
Revert revision 1.4: it seems to have caused serious problems on sgimips,
so I should probably leave it until I get my Indy going.
 1.5  27-Aug-2006  bjh21 Use symbolic names for CSR values after reset.
 1.4  26-Aug-2006  bjh21 When receiving a SCSI message, it's important not to deassert ACK on the last
byte until we've worked out what to do with the message, since if we plan
to reply to it we have to assert ATN before deasserting ACK. Implement this.
 1.3  26-Aug-2006  bjh21 Use standard MSG_IS1BYTE, MSG_IS2BYTE, and MSG_ISEXTENDED macros rather
than rolling our own.
 1.2  26-Aug-2006  bjh21 Use the 'z' size modifier when printfing size_t, so that GCC doesn't complain
on systems were size_t isn't unsigned int.
 1.1  26-Aug-2006  bjh21 Move the sgimips "sbic" driver from arch/sgimips/hpc/sbic.c to
dev/ic/wd33c93.c. This may not be the best WD33C93 driver we've
got, but it's the most recently worked on and probably the most
portable, so it seems like a good basis for further work (and in
particular an acorn26 driver for the Acorn SCSI card). There's
no functional change in this commit, and sgimips kernels still
compile.
 1.6.4.3  14-Sep-2006  yamt sync with head.
 1.6.4.2  03-Sep-2006  yamt sync with head.
 1.6.4.1  27-Aug-2006  yamt file wd33c93.c was added on branch yamt-pdpolicy on 2006-09-03 15:23:57 +0000
 1.6.2.10  24-Sep-2006  bjh21 Pull up timecounter fix from trunk.
 1.6.2.9  29-Aug-2006  bjh21 Remove a rogue printf that crept into the last commit.
 1.6.2.8  29-Aug-2006  bjh21 When reselecting a transfer that had DMA disabled, keep DMA disabled.
 1.6.2.7  29-Aug-2006  bjh21 Add support for negotiating async transfers if the scsipi layer asks for
that, or if the target requests sync transfers but the scsipi layer hasn't
turned them on yet. This is still some way from correctly implementing
the rules in SPI-5, but it's closer than it was.
 1.6.2.6  29-Aug-2006  bjh21 At the end of sync transfer negotiations, record the actual synchronous
transfer agreement that's been reached, rather than rounding it up to
the next transfer period we can support. This is particularly important
for target-initiated negotiations, since otherwise it might end up
transmitting at a lower than necessary rate.

Also, if we've agreed on sync transfer, don't silently try to use async
transfers just because the transfer period we've negotiated is a bit long.
It's possible we should renegotiate async transfers at that point, but for
now we'll just put up with it.
 1.6.2.5  29-Aug-2006  bjh21 Add a couple of debugging messages for tracing transfer mode discussions
with the scsipi layer.
 1.6.2.4  28-Aug-2006  bjh21 Print the attachment message in the attach routine rather than in the bus
reset routine. This should avoid getting odd messages when things go badly
wrong. While I'm there, re-arrange the attach message a bit (to look more
like the NCR53C9x one) and add the clock frequency to it.
 1.6.2.3  28-Aug-2006  bjh21 Ignoring WDTR IN is rude. Respond instead with MESSAGE REJECT OUT, like
any good initiator should.
 1.6.2.2  28-Aug-2006  bjh21 Rather than doing lots of sums every time we need to convert between
SCSI transfer period factors and WD33C93 TPx bits, build a little lookup
table of the available TPFs at startup and use that. This is rather
easier to understand than the old way.

Connectedly, remove code that tested for sc_minsync==0, since that couldn't
reasonably be true. Clients can use cf_flags to disable sync negotiation
if necessary.
 1.6.2.1  28-Aug-2006  bjh21 Reinstate my changes to the message-handling code, ensuring that we don't
release ACK until after we've decided whether we need to reply to a message,
since if we reply, we have to assert ATN before releasing ACK.
 1.7.6.1  22-Oct-2006  yamt sync with head
 1.7.4.2  09-Sep-2006  rpaulo sync with head
 1.7.4.1  05-Sep-2006  rpaulo file wd33c93.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:50:03 +0000
 1.7.2.1  18-Nov-2006  ad Sync with head.
 1.9.6.3  17-May-2007  yamt sync with head.
 1.9.6.2  24-Mar-2007  yamt sync with head.
 1.9.6.1  12-Mar-2007  rmind Sync with HEAD.
 1.9.4.4  27-Oct-2007  yamt sync with head.
 1.9.4.3  03-Sep-2007  yamt sync with head.
 1.9.4.2  30-Dec-2006  yamt sync with head.
 1.9.4.1  01-Oct-2006  yamt file wd33c93.c was added on branch yamt-lazymbuf on 2006-12-30 20:48:04 +0000
 1.10.2.4  23-Oct-2007  ad Sync with head.
 1.10.2.3  01-Jul-2007  ad Adapt to callout API change.
 1.10.2.2  27-May-2007  ad Sync with head.
 1.10.2.1  13-Mar-2007  ad Sync with head.
 1.11.2.1  11-Jul-2007  mjf Sync with head.
 1.17.12.1  25-Oct-2007  bouyer Sync with HEAD.
 1.17.8.1  06-Nov-2007  matt sync with HEAD
 1.17.6.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.18.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.19.12.1  03-Mar-2009  skrll Sync with HEAD.
 1.19.4.1  04-May-2009  yamt sync with head.
 1.22.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.4.1  05-Mar-2011  rmind sync with head
 1.24.22.1  18-May-2014  rmind sync with head
 1.24.18.2  03-Dec-2017  jdolecek update from HEAD
 1.24.18.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.8.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.10.1  20-Mar-2017  pgoyette Sync with HEAD
 1.25.6.1  05-Feb-2017  skrll Sync with HEAD
 1.27.4.1  10-Jun-2019  christos Sync with HEAD
 1.28.14.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.29.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed