Commit Graph

191 Commits

Author SHA1 Message Date
simokawa
1c5a183b7d Include order bit in sdev->type. 2003-08-21 08:40:31 +00:00
simokawa
d369701769 Fill reserved fields of transmitting packets header with zero.
This fixes the if_fwe problem with 1394b chip.

PR and Tested by: nork
2003-08-20 03:11:37 +00:00
simokawa
472beeeb6d Remove unused code. 2003-08-19 08:59:07 +00:00
simokawa
3f81cfafbe Drop too short packets. 2003-08-19 08:50:35 +00:00
simokawa
c05232c451 Allow to access phy registers via ioctl(). 2003-08-19 08:47:49 +00:00
simokawa
81168c64d4 Validate number of iso. DMA channels. 2003-08-12 13:01:27 +00:00
simokawa
2e2a46ee29 Change device name notation.
- /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus.
- /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility.
- Clone devices.
2003-08-05 03:11:39 +00:00
simokawa
ab808e6a79 - Don't mess with TX queue in fwohci_stop() if we failed to attach the device.
Tested by: wilko

- Detect memory mapping failure of registers by checking OHCI version.

Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>
2003-08-04 05:43:02 +00:00
simokawa
e43686a8dc Workaround for gcc on alpha/ia64.
(warning: `xferq' might be used uninitialized in this function)
2003-08-01 17:19:12 +00:00
simokawa
5bab2bb89d Clean up fwdev.
Allocate iso DMA channel dynamically.  This allows us to have more
/dev/fw* than number of DMA channels for asyn. transactions and etc.
2003-08-01 04:51:21 +00:00
simokawa
631df8957e - Disable faking T_DIRECT as T_RBC because we have PIM_NO_6_BYTE now. 2003-08-01 02:24:39 +00:00
simokawa
62a83c4022 - Detect full of DMA channel correctly. 2003-08-01 02:13:25 +00:00
njl
1cd634adc1 Add a PATH_INQ flag, PIM_NO_6_BYTE, which indicates the SIM never wishes to
receive 6 byte commands.  Add a check for this flag to da(4) and cd(4) so
that they honor it.  This is a quick workaround for many devices (especially
USB) that require da(4) quirks to operate.  The more complete approach is
to finish the new transport code which will be aware of the SCSI version a
transport implements.

MFC after:	1 day
2003-07-28 06:15:59 +00:00
peter
a70eae2ee9 Fix some recently introduced warnings. 'Declaration does not declare
anything' etc.
2003-07-26 03:47:56 +00:00
simokawa
329815d7be Clean up include files. 2003-07-18 14:31:16 +00:00
simokawa
64c9528c46 Add some debug messages. 2003-07-18 05:28:30 +00:00
simokawa
830a5c883e Allow retrieval of local Configuration ROM. 2003-07-12 09:34:44 +00:00
simokawa
b42549b725 Configuraiton ROM fix:
- Don't bump the generation if ROM has not changed and keep it
	between 0x2 and 0xf.
- Refetch the ROM if CRC of the businfo block has changed.
2003-07-09 13:07:35 +00:00
simokawa
1a28b01e31 Add compatibility for FreeBSD-4. 2003-07-04 14:04:41 +00:00
imp
e9df6b7a14 All current uses of pci_set_powerstate are bogus, at least in theory.
However, they are presently necessary due to bigger bogusness in the
pci bus layer not doing the right thing on suspend/resume or on
initial device probe.  This is exactly the sort of thing that the
BURN_BRIDGES option was invented for.  Mark all of them as
BURN_BRIDGES.  As soon as I have the powerstate stuff properly
integrated into the pci bus code, I intend to remove all these
workarounds.
2003-07-03 14:00:57 +00:00
scottl
4d495abb9d Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma.  At the moment, this is used for the
asynchronous busdma_swi and callback mechanism.  Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg.  dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create().  The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms.  The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by:	tmm, gibbs
2003-07-01 15:52:06 +00:00
simokawa
7c05940aff Fix tsleep/wakup race on FreeBSD-4. 2003-07-01 12:03:54 +00:00
simokawa
fd6a432df0 Include file clean up. 2003-06-30 06:33:18 +00:00
simokawa
065a386bdc Fix several problems related to resume:
- Initialize fc->status to process bus reset correctly after resume.
- Initialize AT ring buffer pointer.
- Requeue stdma to stfree for active IR buffer.
- Stop DMA before suspend for safe.
- Set powerstate after resume.
2003-06-28 11:11:36 +00:00
simokawa
4f840cc67f - Use fwohci_poll() instead of fwohci_intr() to process the first bus reest.
- Wait 2 cycles before starting the process for fast machines.
2003-06-27 00:27:33 +00:00
simokawa
34a8115079 Bound check for broken Configuration ROM. 2003-06-16 08:43:22 +00:00
simokawa
d30e2638a5 Fix for big endian. 2003-06-16 08:29:24 +00:00
simokawa
b70380d374 Revert previos change for prior release/branch. 2003-06-16 03:44:36 +00:00
simokawa
34e694d8f5 - Enable support for building Configuration ROM.
- Improve probe message for S800 chips.
2003-06-15 04:09:26 +00:00
simokawa
28eeb9781f Fix crom_add_simple_text().
Bytewap Configuration ROM image.
2003-06-15 03:22:30 +00:00
simokawa
e89024c604 Add CSRVAL_VENDOR_PRIVATE. 2003-06-15 03:19:55 +00:00
simokawa
11be88d043 White space fix. 2003-06-15 00:17:38 +00:00
njl
ea1ca84312 Merge common XPT_CALC_GEOMETRY functions into a single convenience function.
Devices below may experience a change in geometry.

* Due to a bug, aic(4) never used extended geometry.  Changes all drives
  >1G to now use extended translation.
* sbp(4) drives exactly 1 GB in size now no longer use extended geometry.
* umass(4) drives exactly 1 GB in size now no longer use extended geometry.

For all other controllers in this commit, this should be a no-op.

Looked over by:	scottl
2003-06-14 22:17:41 +00:00
simokawa
7b62f180d5 Fix typo in the previous revision. 2003-06-10 12:08:58 +00:00
simokawa
d07e95246d Fix struct bus_info on big-endian machines. 2003-06-10 02:29:10 +00:00
simokawa
fae8fb052d Add tx_speed sysctl variable. 2003-06-10 02:27:39 +00:00
simokawa
ec49fe4651 Add id for TI's 1394b link chip. 2003-06-04 04:26:14 +00:00
simokawa
196e6d627e Don't call sbp_do_attach() recursively after agent reset
while device probing.
2003-06-03 23:01:43 +00:00
simokawa
402bb3520a Allocate zeroed space for fwdev. 2003-06-03 22:58:22 +00:00
simokawa
8c022bf81b Open fwmem device exclusively. 2003-06-03 22:52:55 +00:00
scottl
e2a13c1ed2 Remove the redundant declaration of bus_dmasync_op_t. 2003-05-27 16:34:52 +00:00
simokawa
6d94cd1e18 Make it compiled on 4-stable.
Approved by: re (scottl)
2003-05-12 00:42:28 +00:00
simokawa
2d4780fd3a - Use moderate gap counts listed in IEEE1394a.
- Simplify and correct the bus manager election process.
- Check link_active when choosing cycle master.
- Fix location of the cmr bit.

Approved by: re (scottl)
2003-05-11 10:32:20 +00:00
simokawa
d6a0f92ee3 Write to RESET_START register if TARGET_RESET ORB doesn't work for timeout. 2003-05-05 14:50:24 +00:00
simokawa
0e30d7422e Don't panic for FWXF_START state in fw_xfer_unload(). 2003-05-05 10:14:52 +00:00
jake
ffe5115e13 Fix printf format errors. 2003-05-02 17:21:07 +00:00
simokawa
f5248132d5 Fix printf warning caused by recent CAM change. 2003-05-01 03:38:04 +00:00
simokawa
b656a86ad5 Release devq before detach. 2003-04-30 10:32:32 +00:00
simokawa
592c5992f5 Set status to FWDEVINVAL if probe failed. 2003-04-30 10:20:24 +00:00
simokawa
c761300afa Add missing crom_next() in the previous revision. 2003-04-29 23:40:04 +00:00