Skip to contentSkip to conversation

SH/Dreamcast - improve detection of attached peripherals

PATCH In review Adrian McMenamin 4 participants 9 messages Feb 11, 2008 – Feb 14, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SH/Dreamcast - improve detection of attached peripherals

Improve device detection for maple through longer delay

Experience suggests that a much longer delay in setting up the Maple bus on the Dreamcast leads to better hardware detection.

-----

drivers/sh/maple/maple.c +1 -2
index fbca7f8..afb5362 100644
@@ -658,7 +658,6 @@ static int __init maple_bus_init(void)
 		goto cleanup_device;
 
 	retval = driver_register(&maple_dummy_driver.drv);
-
 	if (retval)
 		goto cleanup_bus;
 
@@ -704,7 +703,7 @@ static int __init maple_bus_init(void)
 		mdev[i]->mq->length = 0;
 		maple_add_packet(mdev[i]->mq);
 		/* delay aids hardware detection */
-		udelay(20);
+		mdelay(5);
 		subdevice_map[i] = 0;
 	}
 
#1 lore raw
Quoted 9 lines · Adrian McMenamin

Improve device detection for maple through longer delay

Experience suggests that a much longer delay in setting up the Maple bus on the Dreamcast leads to better hardware detection.

-----

3 -'s only. Not 5, 3.

Patch subjects should follow the format of 'subsystem: description'. In this case, 'maple: improve detection of attached peripherals'.

Quoted 8 lines · Kristoffer Ericson

Greetings,

shortlog:
This patch removes defunct. led support functions from hp6xx.h since they are now added in a proper driver (see commit below). Also adds tabs instead of spaces before comments.

*commit d39a7a63eb3971b1b3cc5c181ed526bf437b1c72

This goes directly in to the commit log. You do not need a greeting, and you do not need a shortlog:. Provide a meaningful subject, and then a short and concise description in the body, nothing more, and nothing less. Also, please ensure that you do not go beyond 80 cols in the text of your body. This not only applies to patch descriptions, but also to any mail you send to the list.

Also, no attachments or MIME damage of any sort. If you aren't sure whether your mailer will mangle the inline patch or not, send it to yourself until you have it working.

Quoted 2 lines

Signed-off-by. With an upper-case S.

I suggest you both re-read Documentation/SubmittingPatches and look out for deviations. This stuff is documented incredibly clearly, and yet there is constant trouble with this for whatever reason. Beyond that, please try applying your patches to a test tree with git-am _before_ sending it to the list. You will very quickly see what needs to be corrected.

I don't mind fixing these things up and merging the patches by hand from time to time, but when every single patch submission requires manual mangling, it simply gets to be a headache.

Please try to follow the established conventions in the future. It will save everyone a lot of time.

#2 lore raw

Re: [PATCH] SH/Dreamcast - improve detection of attached

In reply to Adrian McMenamin
Quoted 22 lines · On Tue, 12 Feb 2008 17:24:25 +0900 Paul Mundt <[email protected]> wrote:
Quoted 9 lines · Adrian McMenamin

Improve device detection for maple through longer delay

Experience suggests that a much longer delay in setting up the Maple bus on the Dreamcast leads to better hardware detection.

-----

3 -'s only. Not 5, 3.

Patch subjects should follow the format of 'subsystem: description'. In this case, 'maple: improve detection of attached peripherals'.

Quoted 6 lines · Kristoffer Ericson

Greetings,

shortlog:
This patch removes defunct. led support functions from hp6xx.h since they are now added in a proper driver (see commit below). Also adds tabs instead of spaces before comments.

Quoted 9 lines
Quoted 2 lines

*commit d39a7a63eb3971b1b3cc5c181ed526bf437b1c72

This goes directly in to the commit log. You do not need a greeting, and you do not need a shortlog:. Provide a meaningful subject, and then a short and concise description in the body, nothing more, and nothing less. Also, please ensure that you do not go beyond 80 cols in the text of your body. This not only applies to patch descriptions, but also to any mail you send to the list.

Ah, that I didn't know. Thought everything after the shortlog was automaticly cut&pasted. Thx.

Quoted 3 lines

Also, no attachments or MIME damage of any sort. If you aren't sure whether your mailer will mangle the inline patch or not, send it to yourself until you have it working.

I wasn't aware my attachments was being mangled in anyway, I'll test on myself until I got it sorted.

Quoted 4 lines
Quoted 3 lines

Signed-off-by. With an upper-case S.

Roger.

Quoted 8 lines

I suggest you both re-read Documentation/SubmittingPatches and look out for deviations. This stuff is documented incredibly clearly, and yet there is constant trouble with this for whatever reason. Beyond that, please try applying your patches to a test tree with git-am _before_ sending it to the list. You will very quickly see what needs to be corrected.

Quoted 6 lines

I don't mind fixing these things up and merging the patches by hand from time to time, but when every single patch submission requires manual mangling, it simply gets to be a headache.

Please try to follow the established conventions in the future. It will save everyone a lot of time.

Thx for info paul. I'll do that.

#3 lore raw
In reply to Adrian McMenamin
Quoted 9 lines · Kristoffer Ericson
Quoted 3 lines · On Tue, 12 Feb 2008 17:24:25 +0900 Paul Mundt <[email protected]> wrote:

Also, no attachments or MIME damage of any sort. If you aren't sure whether your mailer will mangle the inline patch or not, send it to yourself until you have it working.

I wasn't aware my attachments was being mangled in anyway, I'll test on myself until I got it sorted.

My point is that you should not be attaching patches in the first place. The only reason people have for sending patches as attachments is because the inline patch gets mangled. There is never a valid reason for sending a patch as an attachment to the mailing list, it's just a lot more tedious to deal with. Unfortunately there are valid reasons for sending an attachment to the list, so we can't just have messages with attachments auto-discarded, which would be preferable otherwise.

text/plain attachments can occasionally be tolerated, but most mailers tend to use some ridiculous mime type for patches, which means one has to mangle the type back to something sensible before it can be worked with anyways, which is also quite irritating.

Logs and .configs and things of that nature can be attached just fine, since they're not fed through scripts as the patches are, and rarely need to be replied to in-line.

#4 lore raw
In reply to Adrian McMenamin

is there a reason you guys dont use git to submit your patches ? it does take time to learn if you arent familiar, but the time spent more than pays off in the long wrong ... it takes care of all these fun bits for you. a shortened list for arbitrary developers:
1. < make changes to git repo >
2. git add < files you want to commit >
3. git commit -s
- first line is the subject (so you have to follow convention yourself)
- one blank line
- paragraph for body of changelog
so the example commit log would be (just the stuff between the dashes):
----------------------------
SH/Maple/Dreamcast: improve detection of attached peripherals

Blah blah blah this is the long subject explaining why this is wanted.

Signed-off-line: automatically-added-by-the-s-flag
----------------------------
4. git-format-patch HEAD^
5. git-send-email --to [email protected] <list of patches produced>
6. git reset --hard HEAD^

i'm lazy and dont create branches for the small one-off changes. so you guys doing more work would probably want to create a branch before doing the work. in that case, just replace "HEAD^" with like "master" to generate patches of all the commits made to your branch.
-mike

#7 lore raw

Re: [PATCH] SH/Dreamcast - improve detection of attached

In reply to Adrian McMenamin
Quoted 4 lines · On Tue, 12 Feb 2008 10:23:40 -0500 Mike Frysinger <[email protected]> wrote:

is there a reason you guys dont use git to submit your patches ? it does take time to learn if you arent familiar, but the time spent more than pays off in the long wrong ... it takes care of all these fun bits for you. a shortened list for arbitrary developers:

I use git daily to maintain the jlime kernel source repository, don't use it to create patches though.

Quoted 10 lines

1. < make changes to git repo >
2. git add < files you want to commit >
3. git commit -s
- first line is the subject (so you have to follow convention yourself)
- one blank line
- paragraph for body of changelog
so the example commit log would be (just the stuff between the dashes):
----------------------------
SH/Maple/Dreamcast: improve detection of attached peripherals

Quoted 5 lines

Blah blah blah this is the long subject explaining why this is wanted.

Signed-off-line: automatically-added-by-the-s-flag
----------------------------
4. git-format-patch HEAD^

This assumes that your patch is the only diff against current HEAD right? I have loads of changes, so need to pick out the certain commit. I usually do "git diff origin > mypatch.patch" The format patch adds other stuff?

Quoted 1 line

5. git-send-email --to [email protected] <list of patches produced>

That I should use more often.

Quoted 8 lines

6. git reset --hard HEAD^

i'm lazy and dont create branches for the small one-off changes. so you guys doing more work would probably want to create a branch before doing the work. in that case, just replace "HEAD^" with like "master" to generate patches of all the commits made to your branch.
-mike

My repositories are based on linus tree, but I should create a branch towards linux-sh (got seperate tree for that).

Big thanks for tips, I guess its worth learning all aspects of git.

#8 lore raw
In reply to Adrian McMenamin
Quoted 12 lines · Kristoffer Ericson
Quoted 10 lines · On Tue, 12 Feb 2008 10:23:40 -0500 Mike Frysinger <[email protected]> wrote:

1. < make changes to git repo >
2. git add < files you want to commit >
3. git commit -s
- first line is the subject (so you have to follow convention yourself)
- one blank line
- paragraph for body of changelog
so the example commit log would be (just the stuff between the dashes):
----------------------------
SH/Maple/Dreamcast: improve detection of attached peripherals

Quoted 9 lines
Quoted 5 lines

Blah blah blah this is the long subject explaining why this is wanted.

Signed-off-line: automatically-added-by-the-s-flag
----------------------------
4. git-format-patch HEAD^

This assumes that your patch is the only diff against current HEAD right? I have loads of changes, so need to pick out the certain commit. I usually do "git diff origin > mypatch.patch" The format patch adds other stuff?

git-format-patch will generate a diff for the range you specify. You can either use a commit-id as a reference, or track the SH tree in a separate branch and use the symbolic branch name as a reference. HEAD^ will just pop one off of HEAD.

Quoted 4 lines
Quoted 1 line

5. git-send-email --to [email protected] <list of patches produced>

That I should use more often.

As git-send-email takes a list of patches, you don't need to bother with cherry picking or anything like that, you can explicitly just select the ones to send.

git is there to make your life easier, not harder. It helps to use it for what you can. Note however that I do rebase my tree frequently, so I don't particularly encourage people to branch off of it. During non merge-window times, there's basically no reason to reference my tree.