Get counting volume I/Os right.
Count buffer sizes correctly for architectures where ints are not 32 bits.
complete_rqe: Move decrementing active count until after call to
complete_raid5_write, thus possibly avoiding a race condition.
Suggested-by: dillon
Rename user bp to ubp to avoid confusion.
Tidy up comments.
a struct buf. Don't try to examine B_ASYNC, it is a layering violation
to do so. The only current user of this interface is vn(4) which, since
it emulates a disk interface, operates on struct bio already.
ioccom.h defines only implementation detail, and should therefore
only be included from the #include which defines the ioctl tags,
in other words: never include it from *.c
are two supported chips, the NetChip 1080 (only prototypes available)
and the EzLink cable. Any other cable should be supported however as they
are all very much alike (there is a difference between them wrt
performance).
It uses Netgraph.
This driver was mostly written by Doug Ambrisko and Julian Elischer and
I would like to thank Whistle for yet another contribution. And my
aplogies to them for me sitting on the driver for so long (2 months).
Also, many thanks to Reid Augustin from NetChip for providing me with a
prototype of their 1080 chip.
Be aware of the fact that this driver is very immature and has only been
tested very lightly. If someone feels like learning about Netgraph however
this is an excellent driver to start playing with.
coming later this week. Mitsuru IWASAKI provided a patch to -mobile which
I used to make sure I was doing the right thing but only a small part of
the actual patch was used.
that fails to proberly close the disk.
The problem seems to be that the HP burners sometimes return
ready when they actually are not, the solution is to not use
immediate mode on the closing commands. This is suboptimal
for real burners, in that they now hog the ATA bus for possibly
minutes, where its really not nessesary, *sigh*.
not u_long. On i386's with 64-bit longs, returning u_longs indirectly
in (more than) the space reserved for uintptr_t's tended to corrupt the
previous frame pointer in the stack frame, so it was not easy to debug.
The type mismatches are hidden by the bogus cast in DEVMETHOD().
Note that if_aue doesn't strictly depend on usb because it uses the
method interface for calls rather than using internal symbols, and
because it's a child driver of usb and therefore will not try and do
anything unless the parent usb code is loaded at some point. if_aue does
strictly depend on miibus as it will fail to link if it is missing.
53C810 non 'A', 53C815 and 53C825 non 'A' are now
attached by the driver (by default).
The driver uses a different SCRIPTS set based on
MEMORY MOVE instructions for these chips.
2 SCRIPTS sets (firmwares) numbered #1 and #2 are
used for the whole support of the 53C8XX family
to get possible:
- FW #1 : Only based on MEMORY MOVE instructions.
Selected for 810, 815, 825.
- FW #2 : LOAD/STORE based. This is the firmware
also used by previous driver versions.
Selected for other chips.
When both `ncr' and `sym' are configured, `sym'
will now attach all the 53C8XX devices by default.
Previous balancing between `ncr' and `sym' can be
preserved by:
- Either editing sym_conf.h and commenting the
following compile option:
#define SYM_CONF_GENERIC_SUPPORT
(This also saves about 3.5Kb of kernel memory).
- Or setting kernel config option
SYM_SETUP_LP_PROBE_MAP to 64 (bit 0x40)
first. This will fix a few cards that hang on the WD probe. He tells
me that PAO went one step farther and removed the WD proble completely
and none of the cards in the 2.x database broke in PAO3. Since I'm
more conservative in this code, I'm just swapping the order, which he
said also fixed his problem.
Reviewed by: mdodd, iwasaki
Submitted by: sanpai@sanpai.org
The makefile contains a reference to /sys/dev/ppbus. What really should
be done is copy the header files to /usr/include/sys/dev/ppbus.
PR: kern/16767
Submitted by: Jin Guojun (FTG staff) <jin@gracie.lbl.gov>
This driver should support both the SSI (V.35 etc) E1/T1 unchannelized,
DS3 and HSSI cards. Only tested on the SSI card.
More info at: http://www.lanmedia.com
Thanks to LanMedia for donating two LMC1000P cards.
if_de.c driver modified by: LanMedia
NetGraphification by: Stephen Kiernan <sk-ports@vegamuse.org>
in struct bio. Eventually, bio_offset will probably obsolete the
bio_blkno and bio_pblkno fields.
Remove the special hack in atapi-cd.c to determine of bio_offset was valid.
that seems to be working (I have a MF card that has a 336 modem and
ethernet that the probe routine finds, but the attach fails on because
pccardd doesn't do what you'd like with MF cards all the time).
Removed NETBSDTX spares.
Renamed a load of functions - specifcally
start -> tx
init has download, sj and assoc as sub-functions
report_params and update params move to repparams/upparams
Tidied up old #define's
Got rid of old DPRINTF, made printf's RAY_PRINTF and panic's RAY_PANIC
All code KNF
Removed checking the ECF_TO_HOST area in ray_init - this gets hosed
when someone updates/read a parameter from the card so causes
unneeded grief. This required moving the tib check into ray_attach.
Changed handling of interface flags in ioctl so that promiscous mode
changes are only done as needed.
Sequences of comq entries can be added to an array and automatically
dealt with - used in ray_init_user and others.
Moved IFF_RUNNING checks from the comq commands to com_runq - still
not sure what to do so we PANIC - will be fixed.
ray_sj now checks to see if any of the parameters it can update can be
updated.
ray_sj_done now updates parameters to the current n/w set if we changed
them earlier. I was being a bit thick in earlier comments as to why this
check was done - the ECF never changes the parameters.
Assocication with APs is handled outside of ray_sj - need to add
WEP stuff if I ever get my hands on an AP.
ray_stop, ray_unload and ray_reset are currently broken - reset isn't used anyway.
ray_tx_XXX and ray_rx only have cosmetic changes.
Interrupt handler now gets command out of ccs. This is so ray_intr_ccs and
ray_intr_rcs don't need to remap CM (I'm trying to roll things up a bit as
it must be slowing us down).
ray_intr_ccs just vectors commands to functions or error checks - a
jump table could replace it in ray_intr.
Ditto for ray_intr_rcs.
mcast is currently broken - I need to do more work for ALLMULTI etc. This is reasonably easy to fix becuase of the comq array stuff.
Added a few more checks into repparams so that it is firmware version aware. It also uses the new comq framework.
Parameter updating is also much better with the update parameter return routine re-worked.
Added a couple of runq entry helper functions - one that malloc's a new
entry and fills it in with sensible defaults and another that adds and
runs a seqencue of entries.
booting on a RAID volume.
- Change 'id_foo' and 'idfoo' to 'idad_foo' and 'idadfoo'. This makes
names more consistent with the devices that the code belongs to (more
in line with the style used in the amr/mlx driver.)
Reviewed by: jlemon
- Break out the support for the XMAC II's PHY into an miibus driver.
- Reorganize the probe/attach stuff using newbus. Each XMAC is now
attached to the parent GEnesis controller using newbus. This is
necessary since each XMAC must also have an attached miibus, and
the miibus read/write register routines need to be able to get
at the softc struct for each XMAC, not the one for the parent
controller. This allows me to get rid of the grotty code I added
for selecting the unit numbers for the ifnet interfaces: the unit
numbers are now derived from the newbus-assigned unit numbers,
which should track with the ifnet interface numbers. I think.
At the very least, there should never be any collisions.
- Add support for the SK-9821 and SK-9822 1000baseTX adapters. Special
thanks to SysKonnect for loaning me two adapters for testing.
Working download and start/join network. What's nice is that I didn't touch
TX or RX code at all.
Not fully done yet - stubs for assoc, cast, promisc and user param updating. I
can't work out the "nicest" way to get the mcast and promisc interactions
sorted without needing to abort runq commands half way through. And, as
mcast/promisc used elsewhere I want to get this right.
Other stuff
Fancy new debugging with __FUNCTION__ and __LINE__.
Lots of panic's inserted until I check some stuff out.
Removed all of the old scheduler.
Removed start join timeout as I don't need it.
Removed the promiscuous broadcast code that waas ifdef'd out.
New CCS allocation
where we can have targets (based on topology).
Much more importantly, make sure all mods to isp_sendmarker or |= so
we don't lose the marking of a bus that needs to have a marker sent for it.
require full logins after a LIP, which always led to loop resets, and
various other perturbations.
Update 2200 f/w from 2.01.00 release to 2.01.09 release.
- Free resources in all the possible attachment failure cases.
One critical bugfix:
- Fix a race where it was possible to get out of synch with the log
messages from the controller, if the controller hung up for any
period of time (eg. while resetting a SCSI bus). This would result
in an endless string of console errors, bringing the machine to a
halt.
o Modify xe driver to use this.
There's still some issues with this code, so xe can't map the cis just
yet. I'm thinking about how to resolve the issue. pccard_nbk's
pccard_alloc_resource is getting in the way.
I've done this by having requests to allocate memory propigate up the
tree. We'll see how well this works and reevaluate if it isn't
working well. Also initialize ptr in the tuple. As well as minor
reorg of memory allocation. Likely need to do similar things for I/O
when the time comes.
I've move all defines from pccardchip.h into pccardvar.h and
eliminated pccardchip.h.
source address when receiving frames (and keep using address 2 when in
pseudo-IBSS mode). This is apparently necessary in order to obtain the
true MAC address of the sending station which is needed for PPPoE.
Patch supplied by: Blaz Zupan <blaz@amis.net>
multi-firmware support. This patch just changes
numerous names in the driver sources and is actually
nilpotent. This has been checked by comparing the
generated assembly code.
The names that have been changed are related to the
script names. They were named `script' and `script H'.
They are now named respectively `script A' and
`script B'.
before I rip out the scheduler - whilst v. nice 'n all, it is doing the
wrong job. We need something that sends commands to the card atomically
so dhcp etc. works right.
I've renamed and moved a lot of the scheduler code so that it is all
in one place and all starts with ray_cmd_
ray_stop has some debugging crap left in - to be deleted rsn
support. Changes are rather simplifications of the SCRIPTS
interface (prior to complexifying it again;) ), dead code
removes and comment fixes.
Code removed:
- Handling of kernel variables referenced from SCRIPTS.
- Handling of selection without ATN.
Slightly rewritten:
- Handling of illegal phase (4/5) and data overrun conditions.
Simplifications:
- Extended error flag and bits now only set from the C code.
- Move the extended error status (xerr_status) and nego
status (nego_status) outside the data structure accessed
by SCRIPTS (struct dsb).
- Get rid of the script status field (scr_st).
- Only patch SCR_NO_OP SCRIPTS instructions to adapt SCRIPTS
to actual chip capabilities.
Cosmetic changes:
- Miscellaneous comments in SCRIPTS.
- FreeBSD_4_Bus define replaced by FreeBSD_Bus_Io_Abstraction.
Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.
CCD not converted yet, casts to struct buf (still safe)
atapi-cd casts to struct buf to examine B_PHYS
incorrectly attach itself to ThunderLAN adapters which happen to have
a PHY who's model number happens out to be 0.
Problem reported by: Peter L. Thomas <Pete@painless-computing.com>
(which is actually a CATC Netmate).
Gee. I don't know why people make such a fuss over supporting USB ethernet
NICs. This is easier than collecting graft.
in attach.
- Change a EISA_CHANNEL_CLEAR to EISA_CHANNEL_BUSY in ida_v1_submit().
This may fix the problem with EISA IDA adapters though we have not heard
back from testers yet.
Reviewed by: jlemon
o Eliminate cross calls between the devices. Instead move to using the
newbus messaging system. Added three new card calls: attach_card,
detach_card, get_type.
o Eliminate interrupt routine in pccard we never use.
o Move from deactivate to detach for removing cards.
o Start mapping CIS memory, but it is broken and causes panics. At least
it is closer to working than before.
o Eliminate struct device everywhere. It was bogus.
o Initialize softc for pccard device so we have valid pointers to
ourselves.
o Implement routine to find the pcic ivar for a child device of the pccard so
we can use it to talk to the pcic hardware.
o Lots of minor tiding up.
This version now panics when we try to read the CIS. The next batch
of work to make this work is what was outlined in my posting to mobile
about resource allocation and such.
- implement user-initiated background drive rebuild
- implement user-initiated background consistency check
- log controller-initiated background rebuild/check operations
Try to fix the elusive "invalid log operation" bug, and panic if we do
hit this one in the hopes of getting better information.
Tidy up diagnostic messages.
Try to use disk_create/disk_destroy correctly. This isn't working
properly yet, but it's not clear whose fault that is.
robust enough to work with dhcp. Essentially the driver returns to userland
before certain commands have been completed by the card. I'm trying to
work out the best way to fix this. There are very minor functional changes,
most of this is debugging.
Rework of debugging so a bit mask is used and re-allocation around the place.
Tried to protect ray_init with a tsleep until the network has been joined. I think this is only a partial fix as we also update the mcast and promisc
values.
Update the license in the rio_usb.h (now rio500_usb.h) to not be GPL.
Sorry for committing that file in the first place. The change of license
was agreed to by the original author.
non-device code.
* Re-implement the method dispatch to improve efficiency. The new system
takes about 40ns for a method dispatch on a 300Mhz PII which is only
10ns slower than a direct function call on the same hardware.
This changes the new-bus ABI slightly so make sure you re-compile any
driver modules which you use.
- Add support for ISA based DPT adapters (this doesn't quite work yet).
- Sync dpt_eisa.c with my local copy.
- Simplify how EISA IDs are matched.
- Prototype.
- Formatting nits.
- Conform to how I do things in dpt_pci.c/dpt_isa.c.
- Modify dpt_scsi.c:dpt_alloc() to DTRT with newbus.
- Add some comments to dpt_scsi.c:dpt_pio_get_conf().
- Add additional check to dpt_scsi.c:dpt_get_conf().
- Add some useful error messages to dpt_scsi.c:dpt_init().
request could be deallocated before the top half had finished
issuing it. The problem seems only to happen with IDE drives
and vn devices, but theoretically it could happen with any
drive. This is the most important part of a possible series
of fixes designed to remove race conditions without locking
out interrupts for longer than absolutely necessary.
Reported-by: sos
Fix-supplied-by: dillon
From the README:
Any IEEE 802.11 cards use AMD Am79C930 and Harris (Intersil) Chipset
with PCnetMobile firmware by AMD.
BayStack 650 1Mbps Frequency Hopping PCCARD adapter
BayStack 660 2Mbps Direct Sequence PCCARD adapter
Icom SL-200 2Mbps Direct Sequence PCCARD adapter
Melco WLI-PCM 2Mbps Direct Sequence PCCARD adapter
NEL SSMagic 2Mbps Direct Sequence PCCARD adapter
Netwave AirSurfer Plus
1Mbps Frequency Hopping PCCARD adapter
Netwave AirSurfer Pro
2Mbps Direct Sequence PCCARD adapter
Known Problems:
WEP is not supported.
Does not create IBSS itself.
Cannot configure the following on FreeBSD:
selection of infrastructure/adhoc mode
ESSID
...
Submitted by: Atsushi Onoe <onoe@sm.sony.co.jp>
connected during boot and the vpo module is in the kernel/loaded.
In the case where the module is loaded at some later stage with kldload,
the CAM bus is now rescanned as well.
- The driver now uses bus_space() and runs on NetBSD 1.4.2
Submitted by Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
- Remove startup quirks for video and vbi capture for PAL users.
PAL TV users can now run FXTV and Alevt in any order.
- Add support for cable channels >100
Submitted by Scott Presnell <srp@zgi.com>
- New MSP3410/3415 setup code added. This is experimental.
Please set the sysctl hw.bt848.slow_msp_audio to 1 for this.
Submitted by Frank Nobis<fn@radio-do.de>
Pass sc->dev rather than a bogusly cast pccard_softc *sc.
This allows us to insert and remove cards w/o panicing the kernel.
However, the cis isn't mapped in, so the pccard_scan_cis function
fails.
- Request the maximum number of LUNs on a device if it is
a Bulk-Only device.
- Handle NO_TEST_UNIT_READY case for SCSI
- Add NO_START_STOP quirk for LS-120
- Fix a KASSERT which was the wrong way around.
- Kickstart the LS-120 with the infamous LS-120 specific command of
which no one knows what it doesn, apart from the fact that it appeared
in the Linux code someday.
kernel. Justin agress that there is no other reasonable alternative to
do automatic rescans on connect.
The problem is that when a new device attaches to a SIM (SCSI host
controller) we need to send a XPT_SCAN_BUS command to the SIM using
xpt_action. This requires however that there is a peripheral available
to take the command (otherwise xpt_done and later bomb). The RESCAN
ioctl uses the same periph.
This enables a USB mass storage drive to do an automatic rescan on
connection of the drive.
The automatic dropping of a CAM entry on disconnection was already
working (asynchronous event).
The next thing to do is find someone to commit a change to vpo to do the
same thing. Just port umass_cam_rescan and friends across to that
driver.
Approved by: gibbs