Commit Graph

143 Commits

Author SHA1 Message Date
jmc
2a3e786250 Fix fwohci_write's sanity check against large packets. Max rec is only used
when writing directly to the device (ala IEEE1394_TCODE_WRITE_REQ_BLOCK).
Otherwise the largest size is determined strictly by speed
2002-12-09 07:26:02 +00:00
jmc
11b3f4e7d1 Provide a macro for turning a speed number into a max rec value 2002-12-09 07:24:57 +00:00
jmc
3d5ded55c7 Write sbp2_free_data_mapping and fix a bug where read responses weren't sending
back the right tlabel
2002-12-09 07:23:43 +00:00
jmc
1f133763ba Don't need sbp2_datamapping. Each one is tracked via the associated orb 2002-12-09 07:23:24 +00:00
jmc
9bea8ca9b7 Fix logic screwup in determining which bits to set in alloc'ing data maps 2002-12-08 05:59:05 +00:00
jmc
5a69251dd8 Account for corner cases better in alloc_data_mapping and only ask for a 16s
reconnect time instead of 2^16s
2002-12-06 02:19:34 +00:00
jmc
9e81590397 Fill in sc1394_node_id after a self id cycle 2002-12-06 02:17:30 +00:00
jmc
9a4d03f9b2 Add a def for a smaller reconnect time that will be used by default 2002-12-06 02:14:59 +00:00
agc
ecc0017939 Cast appropriately so that this compiles on sparc, sparc64, macppc etc. 2002-12-05 12:22:37 +00:00
haya
805040f592 New Feature: add pseudo device for IEEE 1394 isochronous stream and
isochronous reception routine for IEEE 1394 OHCI (fwohci).  The
transmission part is under construction.

The minimum configuration options for this feature are:

# IEEE 1394 (i.LINK)
fwohci*	at pci? dev ? function ?
pseudo-device	fwiso		1
2002-12-04 00:28:39 +00:00
explorer
4c21f28434 make this compile without SBP2_DEBUG defined 2002-12-03 06:11:31 +00:00
jmc
bd096e500d Set the only big quirk since the drives I've tried return errors on 6 byte cdbs 2002-12-01 12:12:09 +00:00
jmc
4e448779d8 Checkpoint checkin:
1. Clean up some debugging and trigger some on only extreme debugging needs
2. Comment alloc data mapping a bit better and fix some of the bugs here
(note..there still are some so for now the free method is never called while
I track these down)
3. Fix the copying logic in data_resp. It was calculating negative offsets
which blew up memcpy.

At this point I can probe, inquire and get through the findroot steps of a
boot:

sd0 at scsibus0 target 0 lun 0: <Maxtor, 1394 storage, 60> disk fixed
sd0: mode sense (4) returned nonsense; using fictitious geometry
sd0: 76293 MB, 76293 cyl, 64 head, 32 sec, 512 bytes/sect x 156250000 sectors
sd0: mode sense (4) returned nonsense; using fictitious geometry
sd0: no disk label
findroot: can't open dev sd0a (6)

NOTE: This will panic my machine right now with a simple disklabel -r sd0.
Also, since the free mappings routines are if (0)'d out at the moment do not
use this code for anything except experiments and then only on a machine
you don't mind panic'ing.

Fixing the mapping routines will be the next step and then finally chasing
down the proper mode sense these drives understand.
2002-12-01 12:09:56 +00:00
jmc
3b7f83f77f Correct calculating of offsets when memcpy returned data. 2002-12-01 12:05:11 +00:00
jmc
1f366747d4 Tidy up some debug routines and make verbose packet dumps only when sbp2debug>2 2002-11-30 06:18:54 +00:00
jmc
88fe775d19 Print out some more details from incoming packets (tlabel's).
Also, when receiving a write packet, respond with a proper ack if something
was available to process it. (Fixes most of the sbp2 random hangs)
2002-11-30 06:09:42 +00:00
thorpej
c23c86e36b Add ULL to 64-bit integer constants. 2002-11-25 02:30:38 +00:00
jmc
1db8069fe5 First pass (checkpoint checkin) for firewire scsi code.
There are a number of issues here for anyone trying to use this today:

1. On my test drive the command engine on the drive seems to stall after the
   inquire is done. So the mode sense times out for a long time before
   aborting. This obviously needs to be tracked down and fixed.

   However it does do a proper inquire:

scsibus0 at sbpscsi0: 1 target, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Maxtor, 1394 storage, 60> disk fixed

2. This code is quite ugly in places as debug code was added to test things.
   Definitly needs cleanup/documention in places where it's using command
   structures. The structure for alloc'ing orbs, running them through the
   command engine and getting state back is mostly set but implementation needs
   an overhaul in places.

3. For testing I use the following config options:

fwohci* at cardbus? dev ? function ?    # IEEE1394 Controller
fw*     at fwbus?
options FW_DEBUG
options FWNODE_DEBUG
options P1212_DEBUG
options SBP2_DEBUG
options SBPSCSI_DEBUG
fwnode* at fwbus?
sbpscsi* at fwnode?
scsibus* at sbpscsi?
2002-11-22 16:28:54 +00:00
jmc
77b603bc96 Change structure/usage of interface provided callbacks. (read, write, reset)
Push these up to the ieee1394 softc level and make the naming scheme
consistant.
2002-11-22 16:20:17 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
e9d707fbd5 Use CFATTACH_DECL(). 2002-09-30 21:17:57 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
itojun
4ca3b72694 remove obsolete use of M_LINK0. it was planned to be used to identify
isosynchronous stream from others, but end up not being used.
From: Hayakawa Koichi <haya@ilink.sony.co.jp>
2002-06-24 00:42:27 +00:00
itojun
be931241b8 rm unneeded #include 2002-06-21 11:43:04 +00:00
itojun
a42ff1111c don't pull in sys/mbuf.h just for prototype decl 2002-06-21 11:22:17 +00:00
jmc
a3c3d336ee Only dump the rom up to ab_retlen in error cases. Also add in
P1212_ALLOW_VENDOR_DIRECTORY_TYPE to the flags passed to the p1212 parser
2002-04-03 04:15:59 +00:00
jmc
7a4d324653 Clean up some comments 2002-03-29 05:06:42 +00:00
jmc
39b8891129 Update copyright date 2002-03-29 05:05:40 +00:00
nathanw
2a72ef3147 Remove a variable that is unused after the previous ALTQ commit. 2002-03-06 05:33:05 +00:00
itojun
ac36f7cb2c bring in latest ALTQ from kjc. ALTQify some of the drivers. 2002-03-05 04:12:57 +00:00
enami
fa5084d17e Make this file compiles w/o FWNODE_DEBUG. 2002-03-01 01:01:18 +00:00
jmc
71b05541b5 Initial layout for SBP2 routines. Mainly just the code yanked from fwnode.c
so it's not lost.
2002-02-27 05:12:11 +00:00
jmc
6cf5c78fa4 Basic prototype/beginning of firewire disk support using sbp2/scsi. Commiting
to have a baseline.
2002-02-27 05:11:27 +00:00
jmc
40cba409bb Change/pretty up some debugging info.
Also, add unit location fields to the ROM image. The p1212 spec requires
unit locations if you have 2 or more unit directories which is the case for
ipv4 and ipv6 compiled into a kernel.
2002-02-27 05:09:15 +00:00
jmc
f04610f130 Move definition of if_fw fifo location to ieee1394reg.h as it's needed for
filling in unit location in the rom.

XXX: This all is really too welded together. The if_fw code should be
decoupled from this and simply be handed a method by which it can provide
the config rom back to the main code.
2002-02-27 05:07:25 +00:00
jmc
d455d6316d Add 3 more macros for extracting info from bus info block 2002-02-27 05:05:39 +00:00
jmc
ea96c58797 Change length values to u_int32_t 2002-02-27 05:04:28 +00:00
jmc
ed05bf459e Rototill fwnode.c to rely on the p1212 routines to parse and validate the ROM 2002-02-27 05:02:25 +00:00
jmc
8140d3a6bb Note done sections related to fwnode/ieee1212 stuff 2002-02-27 05:00:55 +00:00
jmc
2d478bd8d8 Move over from std to here 2002-02-27 05:00:00 +00:00
jmc
a10cd2d55f Print the tcode in hex when debugging like all other debug statements 2002-02-18 09:10:44 +00:00
augustss
a91e01c9ee s/ab_csr/ab_addr/ so it compiles again. 2002-02-11 12:32:43 +00:00
jmc
edd781367c Change some wording on fw's to make it more logical sounding. 2002-02-03 07:29:14 +00:00
jmc
c4bd465ed5 Add IEEE1394_MAX_REC macro 2002-02-03 07:25:11 +00:00
jmc
715f7380b0 Add an unreg function.
Add a uio struct to the abuf so direct uio supporting calls can be setup.

Change all refs of csr in the abuf to addr as thats it's real function.
2002-02-03 07:24:48 +00:00
ichiro
96f25772c6 OCHI -> OHCI 2002-01-26 16:34:27 +00:00
eeh
12fcdc813a Fix illegal pointer manipulations that cause alignment problems. 2002-01-16 01:47:36 +00:00
tsutsui
e6f8529d26 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:58:16 +00:00