LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Hood <jdthood@mail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.10-ac8 PnP BIOS fix #2
Date: 07 Oct 2001 21:52:43 -0400	[thread overview]
Message-ID: <1002505965.829.92.camel@thanatos> (raw)

Here is a second patch to 2.4.10-ac8 PnP BIOS driver.
It adds error reporting to the dev_node_info, get_dev_node,
and set_dev_node functions. It applies on top of patch #1.

// Thomas
--- linux-2.4.10-ac8-fix/drivers/pnp/pnp_bios.c	Sun Oct  7 15:37:29 2001
+++ linux-2.4.10-ac7-fix/drivers/pnp/pnp_bios.c	Sun Oct  7 12:44:02 2001
@@ -236,7 +236,7 @@
 /*
  * Call PnP BIOS with function 0x00, "get number of system device nodes"
  */
-int pnp_bios_dev_node_info(struct pnp_dev_node_info *data)
+static int pnp_bios_dev_node_info_silently(struct pnp_dev_node_info *data)
 {
 	u16 status;
 	if (!pnp_bios_present ())
@@ -247,6 +247,14 @@
 	return status;
 }
 
+int pnp_bios_dev_node_info(struct pnp_dev_node_info *data)
+{
+	u16 status = pnp_bios_dev_node_info_silently( data );
+	if ( status )
+		printk(KERN_WARNING "PnPBIOS: PnP BIOS dev_node_info function returned error status 0x%x\n", status);
+	return status;
+}
+
 /*
  * Note that some PnP BIOSes (on Sony Vaio laptops) die a horrible
  * death if they are asked to access the "current" configuration
@@ -261,7 +269,7 @@
  *               or volatile current (0) config
  * Output: *nodenum=next node or 0xff if no more nodes
  */
-int pnp_bios_get_dev_node(u8 *nodenum, char boot, struct pnp_bios_node *data)
+static int pnp_bios_get_dev_node_silently(u8 *nodenum, char boot, struct pnp_bios_node *data)
 {
 	u16 status;
 	if (!pnp_bios_present ())
@@ -272,19 +280,35 @@
 	return status;
 }
 
+int pnp_bios_get_dev_node(u8 *nodenum, char boot, struct pnp_bios_node *data)
+{
+	u16 status =  pnp_bios_get_dev_node_silently( nodenum, boot, data );
+	if ( status )
+		printk(KERN_WARNING "PnPBIOS: PnP BIOS get_dev_node function returned error status 0x%x\n", status);
+	return status;
+}
+
 /*
  * Call PnP BIOS with function 0x02, "set system device node"
  * Input: *nodenum = desired node, 
  *        boot = whether to set nonvolatile boot (!=0)
  *               or volatile current (0) config
  */
-int pnp_bios_set_dev_node(u8 nodenum, char boot, struct pnp_bios_node *data)
+static int pnp_bios_set_dev_node_silently(u8 nodenum, char boot, struct pnp_bios_node *data)
 {
 	u16 status;
 	if (!pnp_bios_present ())
 		return PNP_FUNCTION_NOT_SUPPORTED;
 	Q2_SET_SEL(PNP_TS1, data, /* *((u16 *) data)*/ 65536);
 	status = call_pnp_bios(PNP_SET_SYS_DEV_NODE, nodenum, 0, PNP_TS1, boot ? 2 : 1, PNP_DS, 0, 0);
+	return status;
+}
+
+int pnp_bios_set_dev_node(u8 nodenum, char boot, struct pnp_bios_node *data)
+{
+	u16 status =  pnp_bios_set_dev_node_silently( nodenum, boot, data );
+	if ( status )
+		printk(KERN_WARNING "PnPBIOS: PnP BIOS set_dev_node function returned error status 0x%x\n", status);
 	return status;
 }
 


                 reply	other threads:[~2001-10-08  1:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1002505965.829.92.camel@thanatos \
    --to=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] 2.4.10-ac8 PnP BIOS fix #2' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).