Commit Graph

463 Commits

Author SHA1 Message Date
phk
54a5f50c0e Unhook the SCSI CD driver from the disk "mini-layer" and/or GEOM.
SCSI disks are too square pegs for the round holes in both of these.

And since atapi-cd has clearly shown that there are better acccess
models for CD media than trying to pretend to be a classical disk,
we stop the masquerade rather than patch up the costume.

But do implement the DIOCGMEDIASIZE and DIOCGSECTORSIZE so it will
be possible to manually attach to GEOM, should some the need arise.

Ideally, this driver should do media-detection and call make_dev()
when a CD is inserted and destroy_dev() when it is removed, this
would allow our future devd(8) to automount etc etc but coding that
takes SCSI-clue beyond anything I posses.

Tested on:      sparc64
2002-10-04 13:33:30 +00:00
ken
1e1bdbe46b Fix style problems in the quirk entry section.
MFC after:	2 weeks
2002-10-03 19:59:24 +00:00
sobomax
bf14b7124b Add quirks for DaisyTechnology PhotoClip camera.
Submitted by:	Olexander Kunitsa <kunia@istc.kiev.ua>
MFC after:	3 days
2002-10-01 15:42:04 +00:00
guido
ce2b123626 Add quirk for Apacer HandyDrive
MFC after:	1 week
2002-09-30 10:11:34 +00:00
phk
1dfc2c167f Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too.

Inspired by:    FlexeLint warning #512
2002-09-28 17:15:38 +00:00
alfred
ac315391ce use __packed. 2002-09-23 18:54:32 +00:00
mjacob
a2fde432eb A SCSI_DELAY of zero is a legitimate value to have.
The notion that you must "always" have a delay is at best misinformed.
2002-09-23 04:56:35 +00:00
mjacob
116b056425 Note that the large Hitachi's are also CAM_QUIRK_HILUNS 2002-09-23 04:55:32 +00:00
phk
57a346a213 (This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer).  This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by:   DARPA & NAI Labs.
2002-09-20 19:36:05 +00:00
phk
c0477d28f4 Don't use dkunit() to find out unit, we already have our softc pointer
where we can find it.

Don't call dkpart() just to print the result, it is constant.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:25:16 +00:00
brooks
72b448e706 Make SCSI_DELAY setable at boot time and runtime via the
kern.cam.scsi_delay tunable/sysctl.

Reviewed by:	mdodd, njl
2002-09-02 20:10:19 +00:00
njl
8515b5df47 Add \n to various printfs. grep shows these should be the last ones. 2002-08-27 18:43:14 +00:00
gibbs
fb0f9448fc Adjust scsi_calc_syncparam() to the exception table changing from 10ths to
100ths of ns.  This should correct a problem with camcontrol "ignoring"
requests to negotiate to slower speeds.
2002-08-26 17:13:35 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
peter
9c43c0f544 Add some \n's to printf()s 2002-08-24 02:51:28 +00:00
peter
c95babc518 Fix unit wiring. Also, change the variable "hit" to "wired" so that it
is more obvious.

Obtained from:	gibbs/ken
2002-08-24 02:47:01 +00:00
njl
d093261d0a Updates to cmd6workaround:
* Only update cdb in place if not CDB_POINTER
* Correctly check for QFRZ before restarting CCB
* More accurate printf message
* style(9) changes at end

Patch tested successfully on Maxtor 4 G120J6 GAK8.
2002-08-16 22:05:19 +00:00
njl
40c52b5913 Remove cam_extend.[ch] after all references to them were removed.
PR:		kern/39809
Approved by:	gibbs
2002-08-15 20:55:38 +00:00
njl
54a3d67ad2 Remove usage of cam_extend.c, replace with dev->si_drv1
PR:		kern/39809
Approved by:	gibbs
2002-08-15 20:54:03 +00:00
robert
237e4756df Correct spelling of 'supplied'.
PR: misc/39528
2002-06-19 20:44:48 +00:00
mjacob
41b2a6dd7e If we boot verbose, then print out 'interesting' CAM errors that otherwise
would hide problems (like Selection Timeout).
2002-06-07 23:51:30 +00:00
gibbs
de0f199372 Add the 160MHz syncrate to scsi_calc_syncrate() sync period exception table. 2002-06-05 19:10:57 +00:00
gibbs
aefa498e63 scsi_message.h:
Include PPR option bits defined in SPI4.

scsi_iu.h:
	Add data structures releated to parallel SCSI information units
	for use in SPI4 packetized protocol.
2002-06-05 19:05:01 +00:00
mjacob
845c7be0e8 Add REPORT LUNS basic infrastructure. 2002-06-04 17:41:47 +00:00
dillon
d3e6471535 PR: kern/38208
X-MFC after:	immediate w/ release eng approval.
2002-05-29 20:25:59 +00:00
dillon
c9f73458f0 Add a Quirk entry for the USB SimpleTech UCF-100 compact flash reader.
Note that even with the quirk entry the reader typically only works if
the USB device is recognized by UHCI instead of the generic OHCI driver.
2002-05-19 21:59:28 +00:00
mjacob
d7e3245617 Make Veritas Storage Appliance a HILUNS device.
MFC after:	1 day
2002-04-24 00:00:55 +00:00
marcel
084de53dc7 Remove unused static variable quantum. 2002-04-23 06:14:10 +00:00
ken
5d1a9608c2 Fix 3 of the four problems with my last indentation fix. ("fixing" the
fourth would be a divergence from the prevailing style.)

Thanks to bde for catching this.

Pointed out by:	bde
2002-04-01 05:41:33 +00:00
ken
7bf585a15e Fix an indentation problem. 2002-04-01 03:59:47 +00:00
phk
54392107ee DA (scsi) and AD (ata) diskdrivers:
Make the dump routine do just writing of data.
2002-03-31 22:28:03 +00:00
simokawa
8da6f2dfa4 Maxtor Personal Storage 3000XT (Firewire) hangs upon
serial number probing.

MFC after:	1 week
2002-03-24 00:17:39 +00:00
simokawa
0edcbc8d2f Automatically detect devices that do not support READ(6)/WRITE(6)
and upgrade to using 10 byte cdbs.

As far as I tested, this works efficiently for most of the
SBP-II/Firewire devices but most of the umass devices still need
ad-hoc work around because umass-sim doesn't return any SCSI errors.

A sysctl nob is also added for the last resort.
I hope we don't need DA_Q_NO_6_BYTE quirks anymore.

Reviewed by:	gibbs
MFC after:	1 week
2002-03-23 18:18:02 +00:00
alfred
e7a78af097 Remove __P. 2002-03-20 08:56:31 +00:00
phk
8a758b3a13 Mark some arguments __unused. 2002-03-11 08:04:59 +00:00
simokawa
0b19b34b12 Add support for Simplified Direct Access Device in scsi_op_desc(). 2002-03-11 03:08:17 +00:00
jhb
3706cd3509 Simple p_ucred -> td_ucred changes to start using the per-thread ucred
reference.
2002-02-27 18:32:23 +00:00
phk
8b5a71f365 GC: BIO_ORDERED going away. 2002-02-22 09:18:46 +00:00
simokawa
3396fcf863 - Add support for Simplified Direct Access Device, mostly for
Firewire/SBP-II devices.

- Add quirk for Logitec USB/Firewire HDD.

MFC after: 3 days.
2002-02-21 11:58:47 +00:00
mike
bcee06d42c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
bsd
ec225f53d2 Add NO_6_BYTE quirk entry for the LaCie Ltd. 105311 80 Gig USB2 drive.
Submitted by:	Brian Schellenberger <bts@babbleon.org>
2002-02-18 13:35:30 +00:00
phk
6be6d245a4 Remove spurious ';'
Obtained from:	~bde/sys.dif.gz
2002-02-10 21:36:13 +00:00
sobomax
17c3ef73cc Add support of PhotoClip USB Camera (http://www.myphotoclip.com):
- Vendor&Device IDs for USB product,
- quirk for SCSI CAM.

PR:		34481
Submitted by:	Olexander Kunytsa <kunia@x-telecom.net>
MFC in:		3 days
2002-01-31 11:39:17 +00:00
msmith
6d5a228d7f Define the kern.cam sysctl in the cam layer, rather than multiply in several
peripheral drivers.  Remove Ken's comment to the effect that this needed
to be done.

Staticise camnet_ih and cambio_ih.
2002-01-09 03:39:04 +00:00
msmith
5cfc4a9df0 Staticise a debugging variable.
Submitted by:	non
2002-01-09 03:37:16 +00:00
sobomax
b741551a21 Add quirk for DIVA USB Mp3 Player.
PR:		kern/33638
Submitted by:	Olexander Kunytsa <kunia@x-telecom.net>
MFC after:	3 days
		(pending re's approval)
2002-01-08 21:07:46 +00:00
kbyanc
fc0c999770 Extend Olympus E-100RS quirk to cover entire E series of digital cameras. 2002-01-07 03:32:56 +00:00
jhb
1ce407b675 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
jedgar
32ba77b713 Add support for Nikon Coolpix E775 and E885 cameras.
PR:		33407 (E885)
Submitted by:	Brian Behlendorf <brian@hyperreal.org> (E885)
2002-01-01 13:28:43 +00:00
non
58ae9a63fd o Add KLD support for scsi_low.
o Add KLD dependency of ncv, nsp and stg drivers to scsi_low.

Submitted by: takawata
2001-12-15 12:32:23 +00:00