Commit Graph

29781 Commits

Author SHA1 Message Date
bouyer
e981d39ae5 Add some support for 64bit DMA but stick to 32bit DMA for now.
From OpenBSD mfi.c rev 1.119.
2012-08-05 14:54:01 +00:00
degroote
eed1f7342b Add pmf(9) handler to malo(4) wireless driver 2012-08-05 09:16:54 +00:00
riastradh
d237c30a6a ...and be sure to config_pending_decr if kthread_create fails.
This error branch looks suspect, though.  Shouldn't we bail at this
point rather than blithely try to proceed?
2012-08-05 02:47:52 +00:00
riastradh
17be18e233 Restore config pending stuff, adjusted to avoid the race.
Leave a note about what this code probably should look like for
anyone who comes rummaging around with the intent to really fix it.
I would do that myself if I had time and resources to test this at
the moment, and more comfort with our firewire stack, but I don't.
2012-08-05 02:36:16 +00:00
bouyer
45b66ef963 If ch_ndrives is > 0, then ch_drive is not supposed to be NULL. 2012-08-04 21:21:09 +00:00
nonaka
3c7b0f08bb regen. 2012-08-04 13:03:38 +00:00
nonaka
c007ea7074 Add PLANEX GW-USH300N. 2012-08-04 13:03:17 +00:00
nonaka
04a483f9df Match NTT DOCOMO L-02C. 2012-08-04 12:55:06 +00:00
riastradh
de76916995 Add uatp(4), a driver for USB Apple trackpads.
This is a work-in-progress driver for USB trackpads found in Apple
laptops since 2005, theoretically covering more models than pbms(4)
and supporting more features.  However, the motion smoothing and
acceleration formulae are still pretty sketchy, and I have tested
this only on one model of MacBook from 2006.  Feedback welcome.

Should the smooting, acceleration, tapping, &c., be done in userland?
Probably, but we don't have the necessary interface for that to work
well yet -- wsmouse isn't enough as is.
2012-08-04 04:34:54 +00:00
kiyohara
c3316e27d7 Print 'Standard Function Interface Code" in sdmmc_print(), if not SD_IO_SFIC_NO_STANDARD. 2012-08-04 04:06:00 +00:00
riastradh
244b24a294 Fix error branches in ath pci attachment.
Should fix double pci_intr_disestablish if ath_attach fails.

(Still not sure why ath_attach sometimes fails here.)
2012-08-04 04:05:36 +00:00
riastradh
934b1cc688 Fix error branches and config pending races in firewire init.
This way, if anything fails, it just fails; you don't panic.  This can
happen if suspending and resuming of firewire is broken (e.g., as I
encountered in PR kern/44581).
2012-08-04 03:55:43 +00:00
riastradh
efcf62f2ac Fix error branch in wpi(4) firmware loading.
Fixes panic if firmware is not available.
2012-08-04 03:52:46 +00:00
riastradh
b17e540cb9 Fix null pointer dereference in msk_rxeof.
This triggers when processing an RX interrupt that was queued while
stopping the interface, which caused my machine to panic last night.
In this case, just drop the packet.

From OpenBSD's if_msk.c rev. 1.71.
2012-08-04 03:46:30 +00:00
macallan
f3a407118e machfb's memsize is in MB, glyphcache_init expects bytes. doh. 2012-08-03 01:23:32 +00:00
macallan
96245bbb0f add support for anti-aliased fonts 2012-08-02 00:17:44 +00:00
bouyer
b174797739 Make this compile again after DRIVET rename 2012-08-01 09:38:55 +00:00
bouyer
f815d4c9ca Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-08-01 09:02:03 +00:00
bouyer
ed5b6baaab Move a check for the drive type to the right place. This bug would cause
ATA drives to not be detected when the PATA (or emulated PATA) bus is shared
with an ATAPI device.
Should fix the problem reported by various peoples.
Thanks to Onno van der Linden and vanoven@free.fr for pointing out the
code in error.
2012-07-31 15:59:57 +00:00
bouyer
9edd4d81c5 Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-31 15:50:31 +00:00
degroote
98780c5293 Add missing $NetBSD$ tags and __KERNEL_RCSID(). 2012-07-30 20:30:41 +00:00
degroote
aead3000b0 Add malo(4)@pci driver for Marvell Libertas wireless adaptor
Ported from OpenBSD
Known issues :
  - contrary to OpenBSD one, only support pci at the moment, because I don't
    have the necessary hardware to test PCMCIA / CARDUS Marvell Card
  - not connected to pmf(9) (unable to test it)
2012-07-30 18:57:17 +00:00
matt
fb6e3d730b Make PIO on normal SDHC devices work correctly on big-endian machines.
Add locking around interrupt manipulation (it should now be MP safe).
2012-07-30 00:56:01 +00:00
matt
013bd12e9d Add FORCE_DMA quirk for 5U822 (already in lace for 5C822). 2012-07-29 23:14:13 +00:00
jakllsch
db53477265 Remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas.  Originally part of a commit by bouyer@.
2012-07-29 21:10:50 +00:00
rkujawa
77c4799b9f Add wsdisplay ioctls and support for mmap'ing of linear frame buffer. 2012-07-29 20:31:53 +00:00
christos
39863492ce PR/46599: Onno van der Linden: Don't call bus space commands with 0 len.
Causes the sil 3112 controller to lock up.
2012-07-29 18:20:13 +00:00
mlelstv
e5129e3384 Use const nodes. Let sysctl_createv initialize sysctl_data. 2012-07-29 07:04:09 +00:00
pgoyette
fa22835bbb Replace local handling of entropy gathering with the new common code
recently introduced into sysmon_envsys(4).

Thanks to jruoho@ for testing.
2012-07-29 02:58:27 +00:00
matt
9099962388 extern is your friend. especially for variables in header files. 2012-07-28 23:06:30 +00:00
matt
695805a585 Remove tinfo_t which would have been a typedef had someone actually used
typedef but instead it become an unused common.
2012-07-28 23:04:45 +00:00
matt
1750060a5d Use (void *) instead of (type **) which gcc complains about. 2012-07-28 23:03:47 +00:00
matt
99d4e3051d Only SDHC 1.0 controllers can do that fucky MULTI_SEG stuff. 2012-07-28 23:02:57 +00:00
jakllsch
84276f0edb sdhc(4) currently only implements support for the SDHC 1.0 DMA mechanism, so
only enable in that case.
2012-07-28 20:08:51 +00:00
matt
497c94cc1d Fix comments about __bitfield. 2012-07-28 18:38:03 +00:00
hannken
b202e26bfe Minor fix to previous -- release vnode after last use, not before. 2012-07-28 16:14:17 +00:00
hannken
8f23e66316 Use `getdisksize()' to get the size of the mounted-on block device.
Should work for disks without partition table (wedges) now.
2012-07-28 15:12:42 +00:00
matt
b1afbb311c Fix -fno-common found by building i386/conf/ALL 2012-07-28 00:43:22 +00:00
matt
4dcc9e2fdc Make this compile with i386/conf/ALL 2012-07-28 00:42:47 +00:00
matt
5415192cf6 Add EG20T UART entries.
Closes PR/45567.
2012-07-27 21:51:31 +00:00
matt
34f5472e6b Regen. 2012-07-27 21:50:52 +00:00
matt
2725f8aa33 Add EG20T PCH. Closes PR/45567. 2012-07-27 21:50:32 +00:00
jakllsch
8f128a3925 Convert amr(4) to device_t (CFATTACH_DECL_NEW). 2012-07-27 16:25:11 +00:00
jakllsch
d1934bdd72 Convert twa(4) to device_t (CFATTACH_DECL_NEW). 2012-07-27 14:02:17 +00:00
kiyohara
068a6eb9af Add Marvell CESA(Cryptographic Engines and Security Accelerator) module driver.
But support only PIO-mode now.  Also AES-CBC not supported.
 Don't know how to process to AES CBC in PIO-mode. I haven't found IV registers.
2012-07-27 03:00:01 +00:00
jakllsch
102f7b2016 Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
2012-07-26 20:49:44 +00:00
matt
c4e1f425c8 Fix a delay to a correct value. 2012-07-26 18:36:55 +00:00
matt
5440cc3372 MULTI_SEG does not for ESDHC. (Don't know how it works at all on any SDHC
but ...)
2012-07-26 18:36:09 +00:00
yamt
e574760fc9 fix request leak. 2012-07-26 10:13:33 +00:00
uwe
6e502071d7 Regen for VirtualBox ids. 2012-07-26 03:15:10 +00:00
uwe
64e8a6c032 Add VirtualBox ids. 2012-07-26 03:11:41 +00:00
matt
1d3ffa8e77 Clean up error messages.
Tidy some logic.
2012-07-25 03:07:37 +00:00
msaitoh
9d4d0a53dc regen. 2012-07-25 02:05:17 +00:00
msaitoh
d629f3051f Add some Intel devices from document (Intel 7 Series / C216 Chipset
Family Platform Controller Hub (PCH) Family Specification Update)

Modify some devices to clarify
2012-07-25 02:04:42 +00:00
jakllsch
5b9a15ee6c Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
2012-07-24 14:04:28 +00:00
jakllsch
46d3513c30 Use "<<" instead of "<" for shift-to-left. 2012-07-23 14:07:03 +00:00
matt
64c1c6e064 Responses are actually in host order (except SCR which is return in
big endian so that's convert to host order).
2012-07-23 13:32:19 +00:00
matt
adccf9739d Add fec (arm) and mdio (powerpc) 2012-07-23 13:05:48 +00:00
msaitoh
777a6502dc regen. 2012-07-23 07:47:40 +00:00
msaitoh
af0f4fa6d2 Add some ATI and SIS devices.
Fixes PR#39580
2012-07-23 07:47:14 +00:00
kiyohara
52b45b8c4d Support Kirkwoods. Kirkwoods has 4ch for XORE and not has IDMAC. tested on OpenBlockS A6 with ch0 only. 2012-07-23 06:09:47 +00:00
msaitoh
b9bc57065e Add some Intel 7 series devices. 2012-07-23 03:32:30 +00:00
matt
24240d720e Make it match AR8035 2012-07-23 00:09:49 +00:00
jakllsch
217ea076e5 It turns out my previous commit here was off by one. 2012-07-22 19:07:33 +00:00
jakllsch
dc6a13a152 FLUSH CACHE EXT is a 48-bit command, issue as such. Both FLUSH CACHE commands
will return the LBA of first failure in the return task file, specifiy that we
want it read, even if we don't look at the value.
2012-07-22 18:42:11 +00:00
jakllsch
4c0d1d5807 ATA-6 and ACS-2 drafts both say the flush cache commands may take longer than
30 seconds to complete.  For now assume 5 minutes will always be enough.
2012-07-22 18:37:31 +00:00
jakllsch
e6706273af Port multiplier registers are 64-bits wide (although the ones we need only
implement 32-bits).  Implement the access routines using 64-bit values and add
32-bit wrappers thereto.
2012-07-22 18:21:17 +00:00
jakllsch
78a12c25c2 The vendor and product IDs are 16-bit, print out as such. 2012-07-22 18:17:30 +00:00
jakllsch
935da2146f Correctly issue port multiplier register access commands as LBA48 now that the
FIS code doesn't get in the way of doing that.
2012-07-22 18:12:01 +00:00
jakllsch
c2b3a5ec40 KASSERT if we attempt to access an invalid port.
Also, small whitespace change for internal consistency.
2012-07-22 18:03:34 +00:00
jakllsch
be34f7e01d SATA uses the head portion of the device register in the command protocol for
port multiplier register access.  Thus, in the LBA48 case, pass the complete
r(hd|dh)_dh byte back and forth to the upper layers.  (This is irrelevant in
the LBA28/CHS code path for what should be obvious reasons.)
2012-07-22 17:57:57 +00:00
matt
05305b42f7 Regen. 2012-07-22 14:37:34 +00:00
matt
c68c1f6de5 Add more FREESCALE devices
Fix RICOH RU5230 description
2012-07-22 14:36:44 +00:00
matt
0bc3200029 Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
2012-07-22 14:32:49 +00:00
skrll
0c3c3bcfc7 Provide a method for attachments to specify capabilites. 2012-07-21 16:14:05 +00:00
kiyohara
22a31fe368 TWSI size is 0x100. Not 0x1000. 2012-07-21 04:23:16 +00:00
kiyohara
7ae4f9e50f Don't send a stop bit immediately after start bit transmission. 2012-07-21 04:21:14 +00:00
mrg
d6a35d155a now that the task threads are created earlier, move the call to
usb_create_event_thread() back into usb_doattach(), so that eg,
usb_discover() never operates when the root_hub is not setup.

fixes a crash joerg@ reported.
2012-07-20 23:18:02 +00:00
rkujawa
65667a28a9 Preliminary blitter support for Voodoo2. 2012-07-20 21:31:28 +00:00
rkujawa
e815d3fa04 Add 3Dfx Voodoo Graphics (aka Voodoo 1) support. 2012-07-20 12:03:32 +00:00
mrg
ed08188f7a usb task fixes, from jared and myself:
- create the task/event threads in usb_attach() so they're more likely
  to be ready when usb_doattach() runs

- move the task thread creation into usb_once_init(), instead of having
  some other method of only creating them once
2012-07-20 07:31:14 +00:00
msaitoh
1a2764c657 regen. 2012-07-20 04:13:28 +00:00
msaitoh
a8ab1dd382 Add some Intel's devices. 2012-07-20 04:13:06 +00:00
christos
a29c93ee4f don't access memory outside the array bounds. 2012-07-20 02:23:35 +00:00
matt
752fce8819 Add use of watermark register when PIO to an ESDHC. After every kill or
drain of watermask words, pause a bit to give time for the fifo to recover.
Always the command response in BE byteorder.  Rewrite __bitfield to deal
with this.
2012-07-20 02:04:13 +00:00
uwe
598818f0d2 EHCI_USBINTR is 4 bytes wide, use proper access ops. 2012-07-20 01:26:19 +00:00
pooka
fba658ace5 Initialize values to squelch gcc.
from Greg Oster
2012-07-19 22:47:52 +00:00
christos
a0b6dd8ad5 Treat empty package returned from _AL<n> method the same as non-existent.
From jmcneill.
2012-07-19 18:03:32 +00:00
pgoyette
840097bfdf Make sure to re-add the sensor as an entropy source after user request
to reset (via envstat -S)
2012-07-19 13:31:06 +00:00
pgoyette
55a8dfa0ed If previously there was only a dummy event entry (to force refresh for
entropy gathering), allow it to be updated for the current request to
add a real entry.
2012-07-19 13:30:01 +00:00
jakllsch
4e056d4122 Fix MVSATA_WDC_* macros to actually access the Shadow Register Block. 2012-07-19 12:39:08 +00:00
rkujawa
fe9c39afed Add tdvfb. 2012-07-19 09:09:46 +00:00
msaitoh
cf354b8161 regen. 2012-07-19 02:40:57 +00:00
msaitoh
bf39ce7d57 Add XGI Technology's devices. 2012-07-19 02:40:08 +00:00
rkujawa
49332a3493 Add 3Dfx Voodoo2 driver. Still needs some cleanup and prettyfying, but hey
it works.
2012-07-18 23:30:13 +00:00
pgoyette
8aacc86c66 Release the mutex before taking a quick exit. 2012-07-18 20:50:40 +00:00
kiyohara
c2250163ce Add 88F6282. tested only OpenBlockS A6.
Also fix irq 11 to 15.  irq of 2nd NIC is 15.
Remove white-space.
2012-07-18 09:21:37 +00:00
kiyohara
1a7ac6e40d Add 88F6282. tested only OpenBlockS A6. 2012-07-18 09:18:30 +00:00
macallan
700afa7d40 wipe the glyph cache when re-entring terminal emulation mode 2012-07-18 02:31:46 +00:00
matt
09369a733c If there was an error in 32-bit mode, just set ERROR_INTERRUPT otherwise
see if matched anything we care about.
2012-07-17 21:35:26 +00:00
cegger
ce5a3d3562 revert previous. testing queue number requires lock held. 2012-07-17 10:33:46 +00:00
cegger
2329b7a5d5 Do not mutex_enter() a usb_taskq[-1].
Fixes LOCKDEBUG panic.
2012-07-17 10:18:43 +00:00
skrll
720643c0b0 Handle interrupt acknowledgement in the SDHC_FLAG_32BIT_ACCESS case in
the same way as non-SDHC_FLAG_32BIT_ACCESS case.
2012-07-17 05:57:49 +00:00
skrll
786852f302 Whitespace. 2012-07-17 05:47:07 +00:00
pgoyette
063727a480 Extend previous changes so that even sensors which don't use a refresh()
callback to update the value can be polled to provide rnd(4) entropy.
2012-07-16 13:55:01 +00:00
abs
2336bb243d revert last 2012-07-16 12:55:36 +00:00
abs
213efd2227 Allow WSKBDIO_SETMODE 2012-07-16 12:52:47 +00:00
mrg
dd3d2239c3 commit my workaround for PR 46648 for now, as the more involved
fix is not ready yet:

move the clear endpoint stall async call into the task thread,
to avoid trying to call kmem_alloc() from a softint thread.

XXX ideally moving callbacks into the task thread (or perhaps
a different high priority task thread) would be better than this
workaround, once that method is working.
2012-07-15 21:13:31 +00:00
pgoyette
87d1d2214b If a sensor is flagged as capable of providing rnd(4) with entropy,
hook the sensor into rnd subsystem, and make sure we periodically
refresh the sensor whether or not it is being actively monitored.
2012-07-15 18:33:07 +00:00
pgoyette
0bc91edaa9 When unregistering a sensor device, make sure we unregister and delete
all the associated events.
2012-07-15 17:41:39 +00:00
jakllsch
ec123dfac9 Stopgap crash prevention when atadebug_mask includes DEBUG_PROBE bit. 2012-07-15 15:49:46 +00:00
spz
1fdd2bae8c add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan
2012-07-15 11:52:01 +00:00
dsl
c9fe3ca8c3 Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
2012-07-15 10:55:27 +00:00
matt
670d18da6c Regen. 2012-07-15 07:31:18 +00:00
matt
5066e7176b Add AR8035 2012-07-15 07:30:57 +00:00
jakllsch
704527ab00 Fix obvious copy/paste-induced error (my fault) that would clobber
the bottom 24-bits of r_lba during a LBA48 command with AT_READREG.
2012-07-15 01:15:03 +00:00
matt
41b2c64496 Add gic for arm 2012-07-14 07:59:48 +00:00
macallan
b94d298539 wait for the blitter to go idle before trying to send another command
Apparently on some CG6 the GX_FULL bit is not a reliable indication wether the
engine is ready to accept another command ( LX onboard for example ) - might
be a hardware bug.
2012-07-13 19:48:45 +00:00
jakllsch
eff06f78af bus_space_*_stream_N() functions are not universally available.
Provite alternate implementation for when they are unavailable.
2012-07-12 23:07:06 +00:00
jakllsch
de363c8707 Ricoh R5C822 has working DMA, but does not advertise support for it, use force. 2012-07-12 17:37:24 +00:00
jakllsch
2b7f084824 Completely rework (and enable) SDHC 1.0 DMA data transfer.
While without a large physically-contiguous buffer the performance
suffers severly, this should still be better than PIO.
2012-07-12 17:27:42 +00:00
jakllsch
6c3a659165 No need to panic on failure to find a divisor.
Additionally, add commented out calculation of actual clock frequency.
2012-07-12 17:15:27 +00:00
jakllsch
d30654f776 SDHC can have multiple slots, note which slot a specific sdmmc(4) attaches to. 2012-07-12 16:58:50 +00:00
jakllsch
5e33f0e797 SDHCI byte swaps the BE response on the wire into LE registers.
As we always want response data in LE, use bus_space_read_stream.
Additonally, read response data in 1 or 4 4-byte chunks, instead of
one 4-byte chunk or 15 1-byte chunks.
2012-07-12 16:46:48 +00:00
jakllsch
8a594cddf5 Add DMA boundary field shift and mask. 2012-07-12 16:34:30 +00:00
jakllsch
17d30e98ac Always enable and set block count register. We never do infinite transfers.
The old way seemed to be causing issues on a R5C822, at least with DMA enabled.
2012-07-12 16:32:34 +00:00
jakllsch
edab446c67 Add SD_STATUS (ACMD13) opcode. 2012-07-12 16:03:13 +00:00
jakllsch
55591e4a3e If necessary, unload and destroy dmamap upon detach. 2012-07-12 16:01:53 +00:00
jakllsch
9c9fcbaafe Replace integer constant SDMMC_MAXNSEGS with the formula said value was
calculated from.
2012-07-12 15:59:32 +00:00
reinoud
44c0910807 Fix surplus ( that was forgotten to remove in the DRIVE_ to DRIVET_ rototol. 2012-07-12 14:17:03 +00:00
kiyohara
ea897a5d7b Add 88f6282. 2012-07-12 09:39:53 +00:00
kiyohara
fb170c9eb3 Regen. 2012-07-12 09:37:57 +00:00
kiyohara
fca3a771f9 Add Marvell SoC 88F6282. 2012-07-12 09:29:31 +00:00
matt
aa9f240255 Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that). 2012-07-12 03:05:49 +00:00
matt
90d75190c4 Deal with a spare size of 32. XXX necc_offset is only a guess. 2012-07-12 03:05:01 +00:00
macallan
4de7bc18ac deal with negative cache sizes 2012-07-12 01:21:08 +00:00
macallan
7daaf29c68 support anti-aliased fonts 2012-07-12 01:20:22 +00:00
jakllsch
99f6667d4a Fix transposition typo in comment. 2012-07-11 18:21:27 +00:00
macallan
b7d83378aa don't wait for the blitter unless we want to send another command and the
pipeline is full
2012-07-11 16:59:55 +00:00
abs
fc7aa49f55 - Unconditionally initialise tp to avoid a warning
- Use DK_CLOSED rather than CLOSED (no functional change)
2012-07-11 16:41:16 +00:00
macallan
7bb04ad0c4 don't set clipping parameters and such every time we send a blitter command 2012-07-11 15:03:14 +00:00
macallan
4ce7eb58c5 perry some whitespace nits & remove some obsolete comments
no functional change
2012-07-10 22:50:41 +00:00
macallan
67b89d49b5 magic number reduction, no functional change 2012-07-10 22:35:11 +00:00
abs
bf81cf870b revert unwanted part of previous MSCP commit 2012-07-10 22:34:37 +00:00
macallan
fe2d7ebdd3 add some register definitions from xf86-video-suncg6 2012-07-10 22:34:32 +00:00
macallan
fb12d7f4d3 - re-initialize only when we're really going back to terminal emulation
- don't try to redraw a non-existing screen
- don't try to mmap sbus ranges through /dev/ttyE*
2012-07-10 22:33:15 +00:00
abs
77b8a6dc83 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code mscp_attach() still iterates over each unit on a bus,
but mscp_dorsp() now detects if we have reached the last unit and does not
return a bogus additional unit. It also loses a few gotos and handles
noncontiguous unit numbers better.
2012-07-10 22:30:23 +00:00
abs
58d7a6eeb1 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code
mscp_dorsp()
2012-07-10 22:30:22 +00:00
abs
d8a3d8c395 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code mscp_attach() still iterates over each unit on a bus,
but mscp_dorsp() now detects if we have reached the last unit and does not
return a bogus additional unit. It also loses a few gotos and handles
noncontiguous unit numbers better.
2012-07-10 22:30:22 +00:00
dsl
94c7771219 This a 'quick fix' for the breakage in rev 1.35.
Patch from Manuel on current-users mailing list.
Probably requires further investigation, but is a little nicer than
reverting the previous change.
2012-07-09 19:10:16 +00:00
joerg
48afed7b47 Fix use of uninitialized variable. 2012-07-05 12:53:22 +00:00
christos
a3e3a29e66 regen 2012-07-04 01:08:57 +00:00
christos
fe3cff1f52 add another sierra device 2012-07-04 01:08:26 +00:00
bouyer
03c9df05c6 Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed
2012-07-02 18:15:44 +00:00
jdc
9f36442988 Apply lockup fixes from Havard Eidnes/OpenBSD in PR port-sparc64/46260:
- add an additional watchdog for RX overflow
  - re-initialise the chip on device timeout
Also alter the interrupt blanking rate to 8 packets, as per OpenSolaris.
2012-07-02 11:23:40 +00:00
nonaka
cd7cbaa2da regen. 2012-07-01 04:21:10 +00:00
nonaka
74ab589a0b Add NTT DOCOMO L-02C entry. 2012-07-01 04:20:26 +00:00
tsutsui
4403aae449 Make sure that disklabel of md(4) device is initialized
in the case where it's configured in MD md_open_hook().

Without this, msdosfs_mountfs() (which is called from msdosfs_mountroot())
will be called with uninitialized disklabel (d_secsize == 0) and
it gets "panic: buf mem pool index 23" later on atari.
This is because getdisksize() doesn't check returned d_secsize value
and msdosfs_mountfs() blindly calls bread(9) with size==0 in that case.

Should be pulled up to netbsd-6 (at least for atari).
2012-06-30 10:52:31 +00:00
macallan
8c2ffd8ed8 don't spam the EDID block to the console unless options RADEONFB_DEBUG 2012-06-27 07:12:19 +00:00
drochner
c528a400b9 regen 2012-06-26 19:03:07 +00:00
drochner
15db4ef121 fix pci id for the Intel H61 LPC bridge to fit actual hardware (and
the chipset's documentation), and add some PCI-to-legacy bridges
found on recent boards
2012-06-26 19:00:59 +00:00
bouyer
931da08bf7 In some case, when an error is reported by the disk, the ahci controller
still reports a number of bytes transfered equal to bcount.
This then triggers a KASSERT in physio_biodone:
        if (done == todo)
		KASSERT(bp->b_error == 0);
Detect this case in wd(4) (so that the workaround works for other controllers
too if they have the same issue, or if the issue is with the drive)
and claim we didn't read/write anything.
2012-06-26 09:49:24 +00:00
mlelstv
001d5cd77f Make digests work also on big endian machines. 2012-06-25 20:34:26 +00:00
mlelstv
da501d22d0 Add more debugging, fix filehandle usage, login negotiation and session
shutdown.
Add #ifdef'd code to send negotiation parameters in hex instead of base64,
so it works against older Linux targets.
2012-06-24 17:01:35 +00:00
drochner
2c8471c744 stopgap fix for recursive locking on suspend/resume
(This can be simplified imo because interrupts should be disabled
at this point.)
2012-06-24 10:06:34 +00:00
jdc
b67baf6e3e PR kern/46424
Revert the part of revision 1.77 that altered the PHY attachment order.
2012-06-24 09:37:28 +00:00
riastradh
3c457d56bb Take the kernel lock in atapibusdetach just like atapibuschilddet.
Fixes kassert in scsipi_lookup_periph when I press the power button
on one of my laptops (and maybe another one) to power it off.

ok mrg
2012-06-24 07:48:01 +00:00
jdc
e6facd19bf Fix multicast filter set up: we need to byte-swap the hash before writing to
the chip.  While here, remove open-coded copy of ether_crc32_le().
2012-06-23 17:21:12 +00:00
abs
351c7b5d8f - Add racd* devices for MSCP based CD-ROM drives (RRD40s), as opposed
to mixing them in with the ra* disks, modelled loosely on how MSCP
  rx* floppies are handled
- racd* defaults to the same single iso9660 partition as cd*
- Cleanup config option handling slightly so any combination of ra*,
  rx* (and now raccd*) can be defined without build errors.
- Avoid ugly printf when disks have all zero disklabel magic number
2012-06-22 20:42:22 +00:00
jdc
f81d0349d6 Fix fallout from revision 1.46, and call ether_ioctl() in the default path.
Patch from John D. Baker in PR port-sparc/46572.
2012-06-22 11:03:57 +00:00
mrg
6b7316a46a fix locking for isoc transfers, as reported (and the fix tested) by prlw1. 2012-06-22 00:12:23 +00:00
sjg
7b6d7531a8 Install filemon.h 2012-06-20 21:38:26 +00:00
martin
e564894ae9 assemble_login_parameters() has a strange error reporting convention:
errors are positive numbers, so <= 0 is good, not >= ...
This makes CHAP authenticated iscsi logins work.
2012-06-19 14:19:46 +00:00
skrll
0aaa8eb417 Typos in comments. 2012-06-19 07:15:41 +00:00
martin
3183166c6c When issuing a non-dma command, make sure to set the "remaining length of
command to be transfered via dma" (sc_cmdlen) to zero upfront, otherwise we
might get confused on command completition interrupt (no dma active but still
data left to transfer).
2012-06-18 21:23:56 +00:00
dsl
bc1656d830 Missed one of the (void *) casts on the args to sysctl_createv(). 2012-06-18 06:21:11 +00:00
dsl
a25c7cabfc Add explicit (void *) casts for when sysctl_createv() is passed
CTLTYPE_INT but the address of a structure (and a function).
2012-06-16 19:54:01 +00:00
blymn
78c0e4f5d2 Add the CDC protocol identifier "no class specific protocol required"
and allow the umodem match routine to match on this protocol.  This
allows some recent arduino boards serial interfaces to attach.
2012-06-14 05:14:41 +00:00
riz
49449523c7 Add firmware for the RealTek RTL8192CU family of wireless chipsets, and
adapt the urtwn(4) driver to use the new files.  The firmware files were
extracted from the Linux driver at www.realtek.com, version 0005.1230.2011
and the license permits redistribution without modification.

While I'm here, install the files in /libdata/firmware/if_urtwn, like
most of the other network adapter firmware.

urtwn(4) can now operate without needing external files installed.  Tested
on my Edimax adapter.
2012-06-14 04:14:35 +00:00
macallan
ebbeb0ed68 more preparation for alpha support:
- use R3G3B2 colour map
- consistently use ri_devcmap[]
- reshuffle cmap setup, screen cleaning, msg buffer replay etc. to deal
  with the above
2012-06-14 00:56:37 +00:00
macallan
651641ee60 do some minimal setup if we're not the console 2012-06-14 00:21:55 +00:00
macallan
a0d170a779 cosmetics:
- fix/remove outdated comments
- printf() -> aprint_*()
- #if 1 removal
2012-06-14 00:15:07 +00:00
joerg
19434947ab Fix a case where an uninitialized USB pipe could be freed in the error
path.
2012-06-12 20:25:58 +00:00
mlelstv
5741661f64 Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for x86, xen, sparc64.
2012-06-10 17:05:18 +00:00
christos
4061f5ae30 PR/46576: Robert Sprowson: Shutdown doesn't disable TX/RX interrupts in
SEEQ8005 driver, plus misc white-space and 0->NULL fixes.
2012-06-10 15:00:49 +00:00
mrg
dc74fbbf85 merge the jmcneill-usbmp branch. many thanks to jared for the
initial work, and every one else who has tested things for me.
this is largely my fault at this point :-)

the main changes are something like:

        - usbd_bus_methods{} gains a get_lock() to enable the
          host controller to provide a lock for the USB code.
          if the lock isn't provided, old-style protection is
          (partially) applied.

        - ehci/ohci/uhci have been converted to the new
          interfaces, including mutex/cv/etc conversion.

        - usbdivar.h contains a discussion about locking and
          what locks are held for which method calls.  more
          to come for usbdi(9) here.

        - audio drivers (uaudio, umidi, auvitek) have been
          properly SMPified now that USB is ready.

        - scsi drivers have been modified to take the kernel
          lock explicitly before calling into scsi code.

        - usb pipes are associated with a lock, that is the
          same as the controller lock.  (this could be split
          up further in the future.)

        - several usbfoo_locked() or usbfoo_unlocked()
          functions have been added to the usbdi(9) to
          enable functionality with or without the USB
          lock (per controller) already being held.

the TODO.usbmp file has specific details on what is left to
do, including what device-specific changes should be done now
that the whole framework is ready.
2012-06-10 06:15:52 +00:00
mlelstv
b416153514 autodiscover wedges 2012-06-09 06:20:45 +00:00
mlelstv
d1c48dff5a Close file descriptor passed into the kernel on success.
Fix locking of file handle. More cleanup on error paths.
Keep track of CCBs, so they cannot be used after a session ends.
Handle CCB timeouts even when the connection is terminated.
Compute firstdata, firstimmed correctly.
2012-06-09 06:19:58 +00:00
mlelstv
c6cfd0f5c9 Use the label's packname to create wedge names instead of the classic
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.
2012-06-07 16:15:31 +00:00
mhitch
cb21df7acc Fix system freeze when trying to write to a raw iSCSI device with MAXPHYS
bytes.  Newfs does large writes when initializing the filesystem.
First, don't copy the head of a TAILQ to make a copy - the first entry will
still point back to the original head.  This caused the ccb list to link to
itself, resulting in a continous loop processing the same ccb and blocked
interrupts.  Use TAILQ_CONCAT() to copy the list.
Next, the ccb disposition was not set in the ccb when the ccb was throttled,
losing the CCBDISP_SCSIPI, so when a throttled ccb was resent, it failed to
call scscipi_done(), and left that I/O hanging.
I am now able to newfs an iSCSI device, was well as issued large writes
using dd.
2012-06-05 16:36:06 +00:00
dsl
f4005a420d Remove a couple of (void *) casts added in the previous commin.
They aren't needed here (script error).
2012-06-03 13:52:46 +00:00
nonaka
e18bf5b077 add rum, run, urtw, urtwn. 2012-06-03 01:47:26 +00:00
dsl
e21a34c25e Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
mlelstv
7c7e8556c3 avoid namespace pollution when debugging
don't panic when printing data for a dead (NULL) connection
2012-06-02 16:52:11 +00:00
christos
b779684dca p->out is always NULL here 2012-06-02 14:37:38 +00:00
christos
13118cd147 PR/46518: Nat Sloss: stbi splash: compressed PNG file causes panic
Make the kernel FREE macro behave like the userland free(3), i.e. accept NULL
2012-06-02 14:30:04 +00:00
martin
51747486d1 Nat Sloss in PR kern/46516: advance fb pointer by stride, not logical
width of the splash image.
2012-06-02 14:24:00 +00:00
nonaka
c9051a9fd6 Use /libdata/firmware/run instead of /libdata/firmware/rum for run(4) firmwares. 2012-06-01 13:19:38 +00:00
nonaka
6a9737b9fa Add a dependency on bpf module. 2012-06-01 12:38:25 +00:00
pgoyette
865357bdaf Update handling of sysctl stuff when built as modules 2012-05-31 16:09:33 +00:00