Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9327
b: refs/heads/master
c: 1d67e65
h: refs/heads/master
i:
  9325: a5521b9
  9323: 8ab4c16
  9319: f713a74
  9311: edf2b39
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 22, 2005
1 parent 5eb3d50 commit 7532608
Show file tree
Hide file tree
Showing 164 changed files with 1,109 additions and 3,021 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 188bab3ae0ed164bc18f98be932512d777dd038b
refs/heads/master: 1d67e6501b8dba54ef8dcabebe2ad049b8ad0d67
73 changes: 0 additions & 73 deletions trunk/Documentation/device-mapper/snapshot.txt

This file was deleted.

4 changes: 2 additions & 2 deletions trunk/Documentation/sparse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ or you don't get any checking at all.
Where to get sparse
~~~~~~~~~~~~~~~~~~~

With git, you can just get it from
With BK, you can just get it from

rsync://rsync.kernel.org/pub/scm/devel/sparse/sparse.git
bk://sparse.bkbits.net/sparse

and DaveJ has tar-balls at

Expand Down
74 changes: 43 additions & 31 deletions trunk/Documentation/usb/URB.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Revised: 2000-Dec-05.
Again: 2002-Jul-06
Again: 2005-Sep-19

NOTE:

Expand All @@ -19,8 +18,8 @@ called USB Request Block, or URB for short.
and deliver the data and status back.

- Execution of an URB is inherently an asynchronous operation, i.e. the
usb_submit_urb(urb) call returns immediately after it has successfully
queued the requested action.
usb_submit_urb(urb) call returns immediately after it has successfully queued
the requested action.

- Transfers for one URB can be canceled with usb_unlink_urb(urb) at any time.

Expand Down Expand Up @@ -95,9 +94,8 @@ To free an URB, use

void usb_free_urb(struct urb *urb)

You may free an urb that you've submitted, but which hasn't yet been
returned to you in a completion callback. It will automatically be
deallocated when it is no longer in use.
You may not free an urb that you've submitted, but which hasn't yet been
returned to you in a completion callback.


1.4. What has to be filled in?
Expand Down Expand Up @@ -147,48 +145,48 @@ to get seamless ISO streaming.

1.6. How to cancel an already running URB?

There are two ways to cancel an URB you've submitted but which hasn't
been returned to your driver yet. For an asynchronous cancel, call
For an URB which you've submitted, but which hasn't been returned to
your driver by the host controller, call

int usb_unlink_urb(struct urb *urb)

It removes the urb from the internal list and frees all allocated
HW descriptors. The status is changed to reflect unlinking. Note
that the URB will not normally have finished when usb_unlink_urb()
returns; you must still wait for the completion handler to be called.
HW descriptors. The status is changed to reflect unlinking. After
usb_unlink_urb() returns with that status code, you can free the URB
with usb_free_urb().

To cancel an URB synchronously, call

void usb_kill_urb(struct urb *urb)

It does everything usb_unlink_urb does, and in addition it waits
until after the URB has been returned and the completion handler
has finished. It also marks the URB as temporarily unusable, so
that if the completion handler or anyone else tries to resubmit it
they will get a -EPERM error. Thus you can be sure that when
usb_kill_urb() returns, the URB is totally idle.
There is also an asynchronous unlink mode. To use this, set the
the URB_ASYNC_UNLINK flag in urb->transfer flags before calling
usb_unlink_urb(). When using async unlinking, the URB will not
normally be unlinked when usb_unlink_urb() returns. Instead, wait
for the completion handler to be called.


1.7. What about the completion handler?

The handler is of the following type:

typedef void (*usb_complete_t)(struct urb *, struct pt_regs *)
typedef void (*usb_complete_t)(struct urb *);

I.e., it gets the URB that caused the completion call, plus the
register values at the time of the corresponding interrupt (if any).
i.e. it gets just the URB that caused the completion call.
In the completion handler, you should have a look at urb->status to
detect any USB errors. Since the context parameter is included in the URB,
you can pass information to the completion handler.

Note that even when an error (or unlink) is reported, data may have been
transferred. That's because USB transfers are packetized; it might take
sixteen packets to transfer your 1KByte buffer, and ten of them might
have transferred succesfully before the completion was called.
have transferred succesfully before the completion is called.


NOTE: ***** WARNING *****
NEVER SLEEP IN A COMPLETION HANDLER. These are normally called
Don't use urb->dev field in your completion handler; it's cleared
as part of giving urbs back to drivers. (Addressing an issue with
ownership of periodic URBs, which was otherwise ambiguous.) Instead,
use urb->context to hold all the data your driver needs.

NOTE: ***** WARNING *****
Also, NEVER SLEEP IN A COMPLETION HANDLER. These are normally called
during hardware interrupt processing. If you can, defer substantial
work to a tasklet (bottom half) to keep system latencies low. You'll
probably need to use spinlocks to protect data structures you manipulate
Expand Down Expand Up @@ -231,10 +229,24 @@ ISO data with some other event stream.
Interrupt transfers, like isochronous transfers, are periodic, and happen
in intervals that are powers of two (1, 2, 4 etc) units. Units are frames
for full and low speed devices, and microframes for high speed ones.

Currently, after you submit one interrupt URB, that urb is owned by the
host controller driver until you cancel it with usb_unlink_urb(). You
may unlink interrupt urbs in their completion handlers, if you need to.

After a transfer completion is called, the URB is automagically resubmitted.
THIS BEHAVIOR IS EXPECTED TO BE REMOVED!!

Interrupt transfers may only send (or receive) the "maxpacket" value for
the given interrupt endpoint; if you need more data, you will need to
copy that data out of (or into) another buffer. Similarly, you can't
queue interrupt transfers.
THESE RESTRICTIONS ARE EXPECTED TO BE REMOVED!!

Note that this automagic resubmission model does make it awkward to use
interrupt OUT transfers. The portable solution involves unlinking those
OUT urbs after the data is transferred, and perhaps submitting a final
URB for a short packet.

The usb_submit_urb() call modifies urb->interval to the implemented interval
value that is less than or equal to the requested interval value.

In Linux 2.6, unlike earlier versions, interrupt URBs are not automagically
restarted when they complete. They end when the completion handler is
called, just like other URBs. If you want an interrupt URB to be restarted,
your completion handler must resubmit it.
14 changes: 2 additions & 12 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,8 @@ M: wli@holomorphy.com
S: Maintained

I2C SUBSYSTEM
P: Greg Kroah-Hartman
M: greg@kroah.com
P: Jean Delvare
M: khali@linux-fr.org
L: lm-sensors@lm-sensors.org
Expand Down Expand Up @@ -1402,18 +1404,6 @@ L: linux-kernel@vger.kernel.org
L: fastboot@osdl.org
S: Maintained

KPROBES
P: Prasanna S Panchamukhi
M: prasanna@in.ibm.com
P: Ananth N Mavinakayanahalli
M: ananth@in.ibm.com
P: Anil S Keshavamurthy
M: anil.s.keshavamurthy@intel.com
P: David S. Miller
M: davem@davemloft.net
L: linux-kernel@vger.kernel.org
S: Maintained

LANMEDIA WAN CARD DRIVER
P: Andrew Stanley-Jones
M: asj@lanmedia.com
Expand Down
8 changes: 4 additions & 4 deletions trunk/README
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ CONFIGURING the kernel:
your existing ./.config file.
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
with question already answered.

NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
Expand Down Expand Up @@ -199,9 +199,9 @@ COMPILING the kernel:
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you
do a "make modules_install".
Alternatively, before compiling, use the kernel config option
"LOCALVERSION" to append a unique suffix to the regular kernel version.
LOCALVERSION can be set in the "General Setup" menu.
In alternative, before compiling, edit your Makefile and change the
"EXTRAVERSION" line - its content is appended to the regular kernel
version.

- In order to boot your new kernel, you'll need to copy the kernel
image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ common_shutdown_1(void *generic_ptr)
/* If booted from SRM, reset some of the original environment. */
if (alpha_using_srm) {
#ifdef CONFIG_DUMMY_CONSOLE
/* If we've gotten here after SysRq-b, leave interrupt
context before taking over the console. */
if (in_interrupt())
irq_exit();
/* This has the effect of resetting the VGA video origin. */
take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ ENTRY(__switch_to)
#ifdef CONFIG_CPU_MPCORE
clrex
#else
strex r5, r4, [ip] @ Clear exclusive monitor
strex r3, r4, [ip] @ Clear exclusive monitor
#endif
#endif
#if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT)
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/kernel/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copy data from IO memory space to "real" memory space.
* This needs to be optimized.
*/
void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
void _memcpy_fromio(void *to, void __iomem *from, size_t count)
{
unsigned char *t = to;
while (count) {
Expand All @@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
void _memcpy_toio(void __iomem *to, const void *from, size_t count)
{
const unsigned char *f = from;
while (count) {
Expand All @@ -37,7 +37,7 @@ void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
* "memset" on IO memory space.
* This needs to be optimized.
*/
void _memset_io(volatile void __iomem *dst, int c, size_t count)
void _memset_io(void __iomem *dst, int c, size_t count)
{
while (count) {
count--;
Expand Down
29 changes: 6 additions & 23 deletions trunk/arch/ia64/hp/sim/simscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,31 +233,13 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
simscsi_readwrite(sc, mode, offset, ((sc->cmnd[7] << 8) | sc->cmnd[8])*512);
}

static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len)
{

int scatterlen = sc->use_sg;
struct scatterlist *slp;

if (scatterlen == 0)
memcpy(sc->request_buffer, buf, len);
else for (slp = (struct scatterlist *)sc->buffer; scatterlen-- > 0 && len > 0; slp++) {
unsigned thislen = min(len, slp->length);

memcpy(page_address(slp->page) + slp->offset, buf, thislen);
slp++;
len -= thislen;
}
}

static int
simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
{
unsigned int target_id = sc->device->id;
char fname[MAX_ROOT_LEN+16];
size_t disk_size;
char *buf;
char localbuf[36];
#if DEBUG_SIMSCSI
register long sp asm ("sp");

Expand All @@ -281,7 +263,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
/* disk doesn't exist... */
break;
}
buf = localbuf;
buf = sc->request_buffer;
buf[0] = 0; /* magnetic disk */
buf[1] = 0; /* not a removable medium */
buf[2] = 2; /* SCSI-2 compliant device */
Expand All @@ -291,7 +273,6 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf[6] = 0; /* reserved */
buf[7] = 0; /* various flags */
memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28);
simscsi_fillresult(sc, buf, 36);
sc->result = GOOD;
break;

Expand Down Expand Up @@ -323,13 +304,16 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
simscsi_readwrite10(sc, SSC_WRITE);
break;


case READ_CAPACITY:
if (desc[target_id] < 0 || sc->request_bufflen < 8) {
break;
}
buf = localbuf;
buf = sc->request_buffer;

disk_size = simscsi_get_disk_size(desc[target_id]);

/* pretend to be a 1GB disk (partition table contains real stuff): */
buf[0] = (disk_size >> 24) & 0xff;
buf[1] = (disk_size >> 16) & 0xff;
buf[2] = (disk_size >> 8) & 0xff;
Expand All @@ -339,14 +323,13 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf[5] = 0;
buf[6] = 2;
buf[7] = 0;
simscsi_fillresult(sc, buf, 8);
sc->result = GOOD;
break;

case MODE_SENSE:
case MODE_SENSE_10:
/* sd.c uses this to determine whether disk does write-caching. */
simscsi_fillresult(sc, (char *)empty_zero_page, sc->request_bufflen);
memset(sc->request_buffer, 0, 128);
sc->result = GOOD;
break;

Expand Down
Loading

0 comments on commit 7532608

Please sign in to comment.